Java PaaS          Scaling in CloudBees                          http://clean-clouds.comhttp://clean-clouds.com
Scaling Applicationshttp://clean-clouds.com
Vertical Scaling        Horizontal ScalingScaling Applicationshttp://clean-clouds.com
Auto-Scale Source: CloudBeeshttp://clean-clouds.com
Auto-Scale Source: CloudBeeshttp://clean-clouds.com
Auto-Scalehttp://clean-clouds.com
   To easily setup session clustering for your     production applications.    To store HttpSession-scoped data in a    ...
Download with Linkedin Username/Password http://clean-clouds.com
Download with Linkedin Username/Password http://clean-clouds.com
Download with Linkedin Username/Password http://clean-clouds.com
Download with Linkedin Username/Password http://clean-clouds.com
Download with Linkedin Username/Password http://clean-clouds.com
http://clean-clouds.com
Upcoming SlideShare
Loading in …5
×

Scaling - CloudBees

723 views

Published on

Scaling - CloudBees

Published in: Technology, Business
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
723
On SlideShare
0
From Embeds
0
Number of Embeds
85
Actions
Shares
0
Downloads
4
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide
  • The real fun with a PaaS begins when the applications need to scale. With CloudBees, scaling is seamless and easy - although you have to be on a paid subscription. Enabling paid subscription is easy - ofcourse we must make it easy ;-). Once enabled - your application management screen will show new options
  • Vertical scaling for the application is achieved through "app-cells" (the radio buttons in the above image). Choose the appropriate size and voila you have just scaled your free application to service its request faster.The drop down in the above image lets you choose the number of machines to add to scale horizontally. Applications can choose specific number of instances (upto 10) and set this up statically. 
  • Automatic scaling of your application (autoscale) sometimes causes concern (will it cost me too much? how does it work?).You can see this is fairly "peak" ish - in this case it isn't to do with time of day. If it is time of day related, would be a bit "smoother" and perhaps have some curves: So - in the above graphs there is a red and green line (put there by me). Lets say that above the red line - user experience suffers. Below the green line means that we are wasting money ! (running too many servers). ie: the ideal would be for requests to sit in between the lines as much as possible (optimal user experience for amount of money spent). That is all autoscale does ! It tries to keep things in the applications "happy place" as you describe it. 
  • Settings in the console like the above would try to keep your application within the red and blue lines (red being 1500 requests per server per minute - green being below 1000). As autoscale adds more servers - the load is spread out - thus reducing the per-server counts (and so on).There are many metrics you can use to trigger scaling - could be CPU or threads or memory, every application is different (but request count is a great starting point). Note that "request count" in this context means per server count - which is over the period of time selected below:  You also set upper and lower limits of course (so in the worst case you would be running 10 app instances). The measurement window is how long to take the samples over (a minute is sensible). Cool-down means how long to wait after taking action before taking action again - this allows the change to take effect before autoscale will re-evaluate and decide if more corrective action is required. You can see these are short periods of time - so you can quickly let the system adapt to changes in load and hopefully save some money and hassle !The autoscale service also knows about your applications preferences - this is stored as a list of scale rules - in JSON. The service then listens to the app.stat stream and does very simple stream processing over it (keeping a short window of data to calculate means, medians etc over) - should it detect that your application is outside of its "happy place" - it will send a message to the deployment api service - this will then add more capacity or reduce capacity as it is told - as long as it is in the range that you specified (it won't go crazy and just keep adding or removing servers). Tools like New Relic can provide insight to help you identify what the triggers should be for your application. 
  • The real real fun starts where instead of setting instances statically, applications let RUN@cloud automatically add instances to deal with the traffic. This article de-mystifies auto-scale. In short - autoscaling lets application monitor some key health indicators (like the ones we saw in the monitoring section) and set rules. The platform monitors the application metrics and adjusts the number of machines automatically. The image on the left shows the numerous metrics that can be monitored. The image on the right shows one configuration where the number of instances range from 1 to 3 and we scale up when the average response time becomes greater than 1sec and scale down when the response time falls to 0.5 seconds.
  • Session stores are a new feature that allow you to easily setup session clustering for your production applications.  By enabling this feature, the application's will be upgraded to store HttpSession-scoped data in a CloudBees session-store that is synchronized across multiple application instances, and will prevent the loss of session state as applications updates are deployed to the platform.  This creates a much more consistent experience for customers using your applications as you push updates.SessionStores are available when you upgrade your application to a paid configuration.  To create an application session-store, you will need to use the CloudBees SDK.Example: Create a 100MB session-store resource named session1Once the session store has been created, you can associate it to your application using the RUN@cloud console by selecting the created resource from the "Session Clustering" drop down menu on your application configuration tab or use the SDK.Example: Bind the application resource session1 to the  application   bees app:bind -a account/application -r session1Application SSLThe new CloudBees SSL feature allows you to setup dedicated SSL routers on your CloudBees account that can be used to route requests to your applications using your own SSL certificates.
  • Scaling - CloudBees

    1. 1. Java PaaS Scaling in CloudBees http://clean-clouds.comhttp://clean-clouds.com
    2. 2. Scaling Applicationshttp://clean-clouds.com
    3. 3. Vertical Scaling Horizontal ScalingScaling Applicationshttp://clean-clouds.com
    4. 4. Auto-Scale Source: CloudBeeshttp://clean-clouds.com
    5. 5. Auto-Scale Source: CloudBeeshttp://clean-clouds.com
    6. 6. Auto-Scalehttp://clean-clouds.com
    7. 7.  To easily setup session clustering for your production applications.  To store HttpSession-scoped data in a CloudBees session-store that is synchronized across multiple application instances.  Available when you upgrade your application to a paid configuration.  Create a 100MB session-store resource named session1 ◦ bees app:session-store:create session1 -a account/application -size 100mb -bind false Application Session Storeshttp://clean-clouds.com
    8. 8. Download with Linkedin Username/Password http://clean-clouds.com
    9. 9. Download with Linkedin Username/Password http://clean-clouds.com
    10. 10. Download with Linkedin Username/Password http://clean-clouds.com
    11. 11. Download with Linkedin Username/Password http://clean-clouds.com
    12. 12. Download with Linkedin Username/Password http://clean-clouds.com
    13. 13. http://clean-clouds.com

    ×