user1708240
user1708240

Reputation: 319

How to automatically scale up and down Amazon EC2 ubuntu micro instances

I am building a project in which i use amazon EC2 micro instance as a server which is running ubuntu on it. I want that if the resources of this server e.g. RAM to serve the requests are exhausted , it should automatically scale up and down . I have heard of it very often but don't know how to make this instance automatically scalable. I connect to my instance using ssh through command line and i can make it start and stop etc. using AWS Management Console in browser.

Upvotes: 4

Views: 1748

Answers (2)

Fakhar Anwar
Fakhar Anwar

Reputation: 33

You can scale up the over-all Throughput (number of requests per second) as well as speed-per-request of an existing App, up to 80 times to 200 times, by replacing its "blocking (synchronous)" code with a non-blocking (asynchronous / concurrent) code (framework). (See TechEmpower Benchmarks).

Such scaling up will satisfy your needs up to an extended future (and most probably for life-time). It will also reduce your reliance on and cost of DevOps, and will minimize the complexity of administrating different traditional (old-fashioned) approaches like Queues, and third-party services (like for WebSocket).

Question becomes "which Asynchronous Framework" ? We have Netty and VertX frameworks (for Java and Kotlin), Tornado (for Python), Google's Go-lang, Erlang, MS .Net (Core) and Swoole (for PHP), NodeJS (for JavaScript) are fewer popular frameworks.

I choose Swoole (PHP) as it has zero learning curve and is easy to use and understand, with a more reliable (multi-process, multi-threaded) Architecture (specially if compared to NodeJS).

After we scale up the Performance, we are then left with minimal (rare) needs for Scaling-Out Horizontally, which as you know is possible to do dynamically at run time.

Upvotes: 1

E.J. Brennan
E.J. Brennan

Reputation: 46839

Generally speaking, when you are talking about auto scaling you are dealing with a system that adds more instance in response to more demand, and deleting instance in response to dwindling demand.

I am not saying its impossible to autoscale a single instance, but if you can, its at a minimum going to require the instance to go off-line for a bit while it reconfigures itself and reboots. Usually not an option for a lot of systems.

Much better, imo, to architect your solution to use additional instances when you need more horsepower if possible and delete those instances as they become idle instead of sizing up or down a single instance.

Upvotes: 3

Related Questions