Scaling is a good problem. How to scale your application?

Coding Monk
Apr 11, 2019 · 3 min read

There are two kinds of problems. Good problems and bad problems. Problems always comes with cost. You need to check whether solving that problem is worthy ? Will it make your app faster and highly available ?

Today every startup wants to grow large, larger or huge. Few people gets together, gets some idea, writes some code and rolls out. Startup is started. Everyone wants to reach millions of people. If startup fails then there is no issue. But when people likes idea, and starts adapting it. Then Problem arises.

Shitty code and shitty project structure always makes scaling hard. Scaling is not a problem at all. The way code is written is a problem. Here are some points which can help you to visualize your application in large scale production environment. But before that let’s see types of scaling.

I came across very nice definition of both type of scaling on stack overflow:

Horizontal Scaling is millions of minions working together for you and vertical scaling means one big hulk will handle your business. got it, right ? No ? Go ahead reading.

Vertical Scaling

Vertical scaling means you add more power (CPU/RAM) to your existing machine. Eg. Your web app became so much popular that people are crazy about all over the world. Your EC2/VPS instance is not enough handle the request pool. You go to your service provider, make few clicks and upgrade server to larger CPU/RAM. Now you can handle enough amount of traffic. That’s vertical scaling.

Data is meant to be queried, so when single node faces lot’s of query it becomes too hard to handle. For large applications involving loads of querying shouldn't implement vertical scaling. If you have limited amount of users and load, this technique is for you. Mostly uses Relational Database Management.

Pros.

  1. Application compatibility is retained.

Cons.

  1. It costs too much.

Horizontal Scaling

When your users goes crazy about your app. You add more machines not more power to your existing machine. If your app is being used world wide these kind of scaling is very beneficial, in that case you spin up instance in different regions.

Your data can be distributed over network, so you can make it available to specific region or geographical area.

Pros.

  1. No Downtime(Less ;) ), if you want to go for maintenance your application will be still up and running.

Cons.

  1. Your application will need to be designed in specific way.

How to build scalable Application ?

If you want to write scalable application there are two ways to write code.

  1. Write Code and then think about scalability.

If you think you can first think about scalability, then go ahead reading.

  1. Write code in modules which are independent of each other at code level.

So these were the points to keep in mind. if you have some tips to make scaling easier, don’t forget to comment below. For more scaling and DevOps related tutorials, tricks and guide. Subscribe Coding Monk YouTube Channel. Here is a link https://www.youtube.com/channel/UC6WmItI0_8ItxS8m3Lna4-g

Coding Monk

We are here for quick tutorials, it may be server…

Coding Monk

We are here for quick tutorials, it may be server administration, server setup, dev ops, simple programming tips, simple hacks for server and many other things.

Coding Monk

Written by

We are here for quick tutorials, it may be server administration, server setup, dev ops, simple programming tips, simple hacks for server and many other things.

Coding Monk

We are here for quick tutorials, it may be server administration, server setup, dev ops, simple programming tips, simple hacks for server and many other things.