Skip to content
loading...

Backend App is Done, Published using single instance of VM, A Guide to Scale?

harryawk profile image Harry Alvin Waidan Kefas github logo ・1 min read

So here's the thing. There is a backend application that contained REST API service. It was already deployed in a VM instance.

Horizontal Scaling

In order to enable the backend app to serve more connections, is load balancing (instantiate new instances and config NGiNX) the only thing possible?

Vertical Scaling

Alternative way to enable the backend app to serve more connections, is upgrading the instance spec the only thing possible?

Other Scaling

Is there something other than horizontal or vertical scaling in order to enable this backend app to serve more connections?

Something like refactor code to be more efficient by add or change something in the code?

P.S.

I appreciate any kind of thoughts about this topic.

twitter logo DISCUSS (4)
Discussion
markdown guide
 

No, I haven't actually. What I know about load-testing is just running Apache Benchmark (or any other similar tools) command and I haven't done it.


and see if you can fix them by adjusting the app itself

Is this one talking about refactor the code in order to get better performance? I see.

So, the thing you were trying to say was we need to adjust the code until it performs best and then increase the load-balanced instances and do the instance addition until it meets our performance expectation?

Thus, if the performance in a single instance is enough then it wouldn't needed any horizontal or vertical scaling?

 

The name is "optimization". Optimize your code in order to get the best possible performance.

Also, what means "enough performance"? It is never "enough" just like that.

What if someone shares a link to your site on some of the social networks? Can your back-end serve several hundred thousand visitors daily on a single VM?

Also, what means "enough performance"? It is never "enough" just like that.

What i meant by "enough" was "tolerated by the users" without considering any unexpected exploitation of the backend (like exposed endpoints, exposed third-party apps, etc).

What if someone shares a link to your site on some of the social networks? Can your back-end serve several hundred thousand visitors daily on a single VM?

What if, we monitor the instance on the go and just increase the instance when the requests served exceeded the instance limit? Is this the best idea to minimize the cost of server rental?

Anyway, thanks for leaving your thoughts~

Classic DEV Post from Aug 4 '19

You're not worth hiring unless...

Harry Alvin Waidan Kefas profile image
Web, Android App Developer