deploymentamazon-web-servicescloudpuppetjuju

Automatically increase or decrease servers


I developed an app, both app server and database server(NoSQL) are distributed. app server and database server are on cloudy(AWS or Azure), and both I have backup the snapshot of them.

I'm just wondering, is it possible automatically increase or minus servers base on the online user amount?

I know there are some tech(pippet juju), but I hope it can be

let my app monitor the amount of online users, if it exceeds the limitation(the limitation is base on my test to get), my app can call its api to establish a new cloudy server and copy the snapshot of app server or database server to it.

If user amount is quite lower than current servers limitation, it will led the new user to some Integration server until removing the server has no user.


Solution

  • Both Azure and AWS provide auto scaling as a part of their infrastructure.

    Both cloud providers can scale automatically based on CPU usage, but if you need custom scaling you may need to write some custom code to work directly with their respective APIs.