Home - mihai-dobre/autoscaling GitHub Wiki

Purpose

The project's purpose is to show the basic principles that can be used to implement a highly scalable project. The idea is to scale on 2 axes: vertically(as much as possible software side) and horizontally(infrastructure wise).

Software scalability

The aim is to use all the CPU cores available. This can be achieved by using threads or processes. In our case, it's not recommended to use threads due to python's GIL(Global Interpreter Lock) which will try to make you program as thread safe as possible. That means that it will, by default, introduce locks in your code and the end result will be a serial execution. So no performance improvement and no where near close to the 100% cores utilization(I have to mention that python threads can be successfully used in IO bound applications). We will be using processes. They are a bit more expensive to start and to kill but they help us achieve the parallel execution that we want.

Infrastructure scalability

We'll be using AWS services to make the infrastructure scale and meet the demands of the application/software scalability. This means starting new instances when the load increases and shutting them down when the load decreases. This will keep the application running and the costs under control.