Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scaling policy #9401

Closed
wants to merge 10 commits into from
Closed

Scaling policy #9401

wants to merge 10 commits into from

Conversation

ioannakok
Copy link
Contributor

@ioannakok ioannakok commented Nov 3, 2023

Our current scaling policy

  • We're using Simple Scaling Policy and are scaling based on ELB/Latency metric.
  • Scaling up by doubling capacity every 10 minutes
  • Scaling down by removing an instance every 2 minutes until we reach minSize of the ASG.

Background

  • AWS have deprecated Simple Scaling Policy and recommending trying a target tracking scaling policy or step scaling policy for better scaling performance.
  • AWS recommends target tracking for a scaling policy that changes the size of the ASG proportionally as the value of the scaling metric decreases or increases, e.g. Average CPU utilization of the Auto Scaling group, see AR example.
  • The current metric we're using, i.e. ELB/Latency does not work for target tracking. According to the docs: "Request latency can increase based on increasing utilization, but doesn't necessarily change proportionally."
  • Also, Latency is an ELB CloudWatch metric and we're moving away from ELB to ALB. ALB CloudWatch metrics do not have Latency so once we swap from ELB to ALB we will have to change the metric anyway.
  • ALB CloudWatch metrics that seem appropriate:
    • RequestCountPerTarget: "The average number of requests received by each target in a target group." (can be used with target tracking scaling)
    • TargetResponseTime: "The time elapsed, in seconds, after the request leaves the load balancer until a response from the target is received." Worth noting the SLI DevX dashboard uses ELB/Latency and ApplicationELB/TargetResponseTime as equivalent metrics to calculate Latency and it looks like for the purposes of scaling they are equivalent. (can be used with step scaling)

image

  • As per AWS docs: "We strongly recommend that you use target tracking scaling policies to scale on metrics like average CPU utilization or average request count per target."
  • Created this dashboard to see the relationship between metrics that can be used for the scaling policy. e.g. here's the relationship between CPU usage and latency for the last year.
image

Next steps

UPDATED:
We're going to do the following (see also release plan) It looks like we have the following options:

  1. Complete the migration from ELB to ALB. Will be done by:
  1. Add the scaling policy using ALB/TargetResponseTime Implement Step Scaling on ELB/Latency before we migrate from ELB to ALB. Once we migrate, we should change the metric to ALB/TargetResponseTime.
  2. Consider whether we also want to scale on CPUUtilisation and / or RequestCountPerTarget.

Copy link

github-actions bot commented Nov 3, 2023

Size Change: 0 B

Total Size: 742 kB

ℹ️ View Unchanged
Filename Size
dotcom-rendering/dist/1028.web.********************.js 783 B
dotcom-rendering/dist/1285.web.********************.js 921 B
dotcom-rendering/dist/1309.web.********************.js 637 B
dotcom-rendering/dist/1378.web.********************.js 503 B
dotcom-rendering/dist/1596.web.********************.js 3.69 kB
dotcom-rendering/dist/1623.web.********************.js 847 B
dotcom-rendering/dist/1712.web.********************.js 3.16 kB
dotcom-rendering/dist/1787.web.********************.js 6.4 kB
dotcom-rendering/dist/192.web.********************.js 4.23 kB
dotcom-rendering/dist/2030.web.********************.js 491 B
dotcom-rendering/dist/2118.web.********************.js 775 B
dotcom-rendering/dist/2138.web.********************.js 2.59 kB
dotcom-rendering/dist/239.web.********************.js 2.49 kB
dotcom-rendering/dist/2406.web.********************.js 3.38 kB
dotcom-rendering/dist/2416.web.********************.js 775 B
dotcom-rendering/dist/2499.web.********************.js 3.51 kB
dotcom-rendering/dist/2710.web.********************.js 999 B
dotcom-rendering/dist/273.web.********************.js 5.75 kB
dotcom-rendering/dist/276.web.********************.js 5.18 kB
dotcom-rendering/dist/2834.web.********************.js 2.51 kB
dotcom-rendering/dist/2903.web.********************.js 884 B
dotcom-rendering/dist/2927.web.********************.js 5.1 kB
dotcom-rendering/dist/2993.web.********************.js 636 B
dotcom-rendering/dist/3551.web.********************.js 3.33 kB
dotcom-rendering/dist/3678.web.********************.js 403 B
dotcom-rendering/dist/3743.web.********************.js 900 B
dotcom-rendering/dist/3999.web.********************.js 744 B
dotcom-rendering/dist/4355.web.********************.js 710 B
dotcom-rendering/dist/4567.web.********************.js 819 B
dotcom-rendering/dist/4645.web.********************.js 40.3 kB
dotcom-rendering/dist/4946.web.********************.js 718 B
dotcom-rendering/dist/4950.web.********************.js 664 B
dotcom-rendering/dist/5055.web.********************.js 2.91 kB
dotcom-rendering/dist/5091.web.********************.js 519 B
dotcom-rendering/dist/5107.web.********************.js 5.03 kB
dotcom-rendering/dist/512.web.********************.js 819 B
dotcom-rendering/dist/5165.web.********************.js 742 B
dotcom-rendering/dist/5209.web.********************.js 525 B
dotcom-rendering/dist/5288.web.********************.js 3.27 kB
dotcom-rendering/dist/5289.web.********************.js 2.47 kB
dotcom-rendering/dist/533.web.********************.js 916 B
dotcom-rendering/dist/5353.web.********************.js 8.9 kB
dotcom-rendering/dist/5840.web.********************.js 915 B
dotcom-rendering/dist/585.web.********************.js 2.85 kB
dotcom-rendering/dist/5927.web.********************.js 819 B
dotcom-rendering/dist/5996.web.********************.js 797 B
dotcom-rendering/dist/6302.web.********************.js 3.6 kB
dotcom-rendering/dist/651.web.********************.js 847 B
dotcom-rendering/dist/6541.web.********************.js 909 B
dotcom-rendering/dist/6602.web.********************.js 13.2 kB
dotcom-rendering/dist/6643.web.********************.js 950 B
dotcom-rendering/dist/6754.web.********************.js 9.99 kB
dotcom-rendering/dist/6763.web.********************.js 589 B
dotcom-rendering/dist/6784.web.********************.js 739 B
dotcom-rendering/dist/6802.web.********************.js 990 B
dotcom-rendering/dist/7002.web.********************.js 871 B
dotcom-rendering/dist/7444.web.********************.js 781 B
dotcom-rendering/dist/7726.web.********************.js 955 B
dotcom-rendering/dist/7860.web.********************.js 675 B
dotcom-rendering/dist/7869.web.********************.js 3.49 kB
dotcom-rendering/dist/7875.web.********************.js 3.79 kB
dotcom-rendering/dist/7973.web.********************.js 3.79 kB
dotcom-rendering/dist/8060.web.********************.js 578 B
dotcom-rendering/dist/8288.web.********************.js 23 kB
dotcom-rendering/dist/8320.web.********************.js 796 B
dotcom-rendering/dist/8395.web.********************.js 5.5 kB
dotcom-rendering/dist/8413.web.********************.js 1.84 kB
dotcom-rendering/dist/843.web.********************.js 613 B
dotcom-rendering/dist/8514.web.********************.js 3.14 kB
dotcom-rendering/dist/8562.web.********************.js 998 B
dotcom-rendering/dist/8585.web.********************.js 2.75 kB
dotcom-rendering/dist/8790.web.********************.js 2.98 kB
dotcom-rendering/dist/8798.web.********************.js 16.2 kB
dotcom-rendering/dist/8859.web.********************.js 3.08 kB
dotcom-rendering/dist/8965.web.********************.js 8.12 kB
dotcom-rendering/dist/8995.web.********************.js 782 B
dotcom-rendering/dist/9008.web.********************.js 4.71 kB
dotcom-rendering/dist/9033.web.********************.js 883 B
dotcom-rendering/dist/9045.web.********************.js 715 B
dotcom-rendering/dist/9157.web.********************.js 5.75 kB
dotcom-rendering/dist/9495.web.********************.js 5.22 kB
dotcom-rendering/dist/9636.web.********************.js 5.2 kB
dotcom-rendering/dist/9721.web.********************.js 646 B
dotcom-rendering/dist/AdPortals-importable.web.********************.js 3.63 kB
dotcom-rendering/dist/AlreadyVisited-importable.web.********************.js 416 B
dotcom-rendering/dist/AppEmailSignUp-importable.web.********************.js 8.18 kB
dotcom-rendering/dist/AppsEpic-importable.web.********************.js 4.02 kB
dotcom-rendering/dist/AppsFooter-importable.web.********************.js 3.56 kB
dotcom-rendering/dist/AppsLightboxImage-importable.web.********************.js 2.94 kB
dotcom-rendering/dist/AppsLightboxImageStore-importable.web.********************.js 2.41 kB
dotcom-rendering/dist/AudioAtomWrapper-importable.web.********************.js 3.58 kB
dotcom-rendering/dist/AustralianTerritorySwitcher-importable.web.********************.js 4.61 kB
dotcom-rendering/dist/Branding-importable.web.********************.js 2.52 kB
dotcom-rendering/dist/braze-web-sdk-core.web.********************.js 36.9 kB
dotcom-rendering/dist/BrazeMessaging-importable.web.********************.js 5.26 kB
dotcom-rendering/dist/CalloutBlockComponent-importable.web.********************.js 6.79 kB
dotcom-rendering/dist/CalloutEmbedBlockComponent-importable.web.********************.js 5.77 kB
dotcom-rendering/dist/CardCommentCount-importable.web.********************.js 4.39 kB
dotcom-rendering/dist/Carousel-importable.web.********************.js 7.78 kB
dotcom-rendering/dist/CarouselForNewsletters-importable.web.********************.js 5.66 kB
dotcom-rendering/dist/ChartAtom-importable.web.********************.js 537 B
dotcom-rendering/dist/CommentCount-importable.web.********************.js 3.21 kB
dotcom-rendering/dist/DiscussionContainer-importable.web.********************.js 23.4 kB
dotcom-rendering/dist/DiscussionMeta-importable.web.********************.js 3.74 kB
dotcom-rendering/dist/DocumentBlockComponent-importable.web.********************.js 3.57 kB
dotcom-rendering/dist/EmbedBlockComponent-importable.web.********************.js 4.1 kB
dotcom-rendering/dist/EnhancePinnedPost-importable.web.********************.js 1.96 kB
dotcom-rendering/dist/FetchOnwardsData-importable.web.********************.js 2.51 kB
dotcom-rendering/dist/FilterKeyEventsToggle-importable.web.********************.js 3.31 kB
dotcom-rendering/dist/FocusStyles-importable.web.********************.js 606 B
dotcom-rendering/dist/FollowWrapper-importable.web.********************.js 3.08 kB
dotcom-rendering/dist/FooterLabel-importable.web.********************.js 337 B
dotcom-rendering/dist/frameworks.web.********************.js 20.7 kB
dotcom-rendering/dist/GetCricketScoreboard-importable.web.********************.js 3.73 kB
dotcom-rendering/dist/GetMatchNav-importable.web.********************.js 9.63 kB
dotcom-rendering/dist/GetMatchStats-importable.web.********************.js 1.74 kB
dotcom-rendering/dist/GetMatchTabs-importable.web.********************.js 2.75 kB
dotcom-rendering/dist/guardian-braze-components-banner.web.********************.js 14.7 kB
dotcom-rendering/dist/guardian-braze-components-end-of-article.web.********************.js 9.3 kB
dotcom-rendering/dist/GuideAtomWrapper-importable.web.********************.js 780 B
dotcom-rendering/dist/HeaderTopBar-importable.web.********************.js 10.8 kB
dotcom-rendering/dist/index.web.********************.js 45.9 kB
dotcom-rendering/dist/InstagramBlockComponent-importable.web.********************.js 3.66 kB
dotcom-rendering/dist/InteractiveBlockComponent-importable.web.********************.js 6.07 kB
dotcom-rendering/dist/InteractiveContentsBlockComponent-importable.web.********************.js 4.63 kB
dotcom-rendering/dist/InteractiveSupportButton-importable.web.********************.js 3.88 kB
dotcom-rendering/dist/KeyEventsCarousel-importable.web.********************.js 4.13 kB
dotcom-rendering/dist/KnowledgeQuizAtom-importable.web.********************.js 3.52 kB
dotcom-rendering/dist/LatestLinks-importable.web.********************.js 1.21 kB
dotcom-rendering/dist/LightboxHash-importable.web.********************.js 429 B
dotcom-rendering/dist/LightboxJavascript-importable.web.********************.js 4.4 kB
dotcom-rendering/dist/LiveBlogEpic-importable.web.********************.js 3.93 kB
dotcom-rendering/dist/Liveness-importable.web.********************.js 4.91 kB
dotcom-rendering/dist/ManyNewsletterSignUp-importable.web.********************.js 5.04 kB
dotcom-rendering/dist/MapEmbedBlockComponent-importable.web.********************.js 5.62 kB
dotcom-rendering/dist/Metrics-importable.web.********************.js 2.29 kB
dotcom-rendering/dist/MostViewedFooter-importable.web.********************.js 5.2 kB
dotcom-rendering/dist/MostViewedFooterData-importable.web.********************.js 3.35 kB
dotcom-rendering/dist/MostViewedRightWrapper-importable.web.********************.js 3.87 kB
dotcom-rendering/dist/OnwardsUpper-importable.web.********************.js 4.16 kB
dotcom-rendering/dist/PersonalityQuizAtom-importable.web.********************.js 3.66 kB
dotcom-rendering/dist/ProfileAtom-importable.web.********************.js 540 B
dotcom-rendering/dist/ProfileAtomWrapper-importable.web.********************.js 799 B
dotcom-rendering/dist/PulsingDot-importable.web.********************.js 746 B
dotcom-rendering/dist/QandaAtom-importable.web.********************.js 536 B
dotcom-rendering/dist/ReaderRevenueDev-importable.web.********************.js 465 B
dotcom-rendering/dist/readerRevenueDevUtils.web.********************.js 2.37 kB
dotcom-rendering/dist/ReaderRevenueLinks-importable.web.********************.js 6.23 kB
dotcom-rendering/dist/RelativeTime-importable.web.********************.js 1.92 kB
dotcom-rendering/dist/RichLinkComponent-importable.web.********************.js 6.18 kB
dotcom-rendering/dist/SecureSignupIframe-importable.web.********************.js 4.92 kB
dotcom-rendering/dist/SendAMessage-importable.web.********************.js 4.39 kB
dotcom-rendering/dist/SendTargetingParams-importable.web.********************.js 2.1 kB
dotcom-rendering/dist/sentry.web.********************.js 768 B
dotcom-rendering/dist/SetABTests-importable.web.********************.js 3.5 kB
dotcom-rendering/dist/SetAdTargeting-importable.web.********************.js 481 B
dotcom-rendering/dist/shimport.web.********************.js 2.78 kB
dotcom-rendering/dist/ShowHideContainers-importable.web.********************.js 642 B
dotcom-rendering/dist/ShowMore-importable.web.********************.js 5.68 kB
dotcom-rendering/dist/SignInGateMain.web.********************.js 3.89 kB
dotcom-rendering/dist/SignInGateMainCheckoutComplete.web.********************.js 4.98 kB
dotcom-rendering/dist/SignInGateSelector-importable.web.********************.js 5.55 kB
dotcom-rendering/dist/SlotBodyEnd-importable.web.********************.js 6.77 kB
dotcom-rendering/dist/SpotifyBlockComponent-importable.web.********************.js 5.47 kB
dotcom-rendering/dist/StickyBottomBanner-importable.web.********************.js 5.54 kB
dotcom-rendering/dist/SubNav-importable.web.********************.js 2.38 kB
dotcom-rendering/dist/SupportTheG-importable.web.********************.js 6.35 kB
dotcom-rendering/dist/TableOfContents-importable.web.********************.js 3.09 kB
dotcom-rendering/dist/TimelineAtom-importable.web.********************.js 1.24 kB
dotcom-rendering/dist/TweetBlockComponent-importable.web.********************.js 1.02 kB
dotcom-rendering/dist/UnsafeEmbedBlockComponent-importable.web.********************.js 3.67 kB
dotcom-rendering/dist/VideoFacebookBlockComponent-importable.web.********************.js 5.64 kB
dotcom-rendering/dist/VineBlockComponent-importable.web.********************.js 3.5 kB
dotcom-rendering/dist/WeatherWrapper-importable.web.********************.js 5.42 kB
dotcom-rendering/dist/YoutubeBlockComponent-importable.web.********************.js 4 kB

compressed-size-action

Copy link

github-actions bot commented Dec 4, 2023

"This PR is stale because it has been open 30 days with no activity. Unless a comment is added or the “stale” label removed, this will be closed in 3 days"

@github-actions github-actions bot added the Stale label Dec 4, 2023
Copy link

github-actions bot commented Dec 8, 2023

This PR was closed because it has been stalled for 3 days with no activity.

@ioannakok ioannakok changed the title Mob/scaling Scaling policy Dec 22, 2023
To fix error:
```
Resource handler returned message: "Period must be 10, 30 or a multiple of 60
```
@ioannakok
Copy link
Contributor Author

Closing in favour of: #10127

@ioannakok ioannakok closed this Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants