[{"data":1,"prerenderedAt":39},["ShallowReactive",2],{"article-horizontal-vs-vertical-scaling-13h4":3},{"type_of":4,"id":5,"title":6,"description":7,"readable_publish_date":8,"slug":9,"path":10,"url":11,"comments_count":12,"public_reactions_count":13,"collection_id":14,"published_timestamp":15,"language":16,"subforem_id":14,"positive_reactions_count":13,"cover_image":17,"social_image":18,"canonical_url":11,"created_at":19,"edited_at":20,"crossposted_at":14,"published_at":15,"last_comment_at":21,"reading_time_minutes":12,"tag_list":22,"tags":23,"body_html":28,"body_markdown":29,"user":30},"article",462896,"Horizontal vs Vertical Scaling","💡 Idea Behind the Scaling   Suppose I have a business application and I want to access it fr...","Sep 22 '20","horizontal-vs-vertical-scaling-13h4","\u002Fashraful\u002Fhorizontal-vs-vertical-scaling-13h4","https:\u002F\u002Fdev.to\u002Fashraful\u002Fhorizontal-vs-vertical-scaling-13h4",2,3,null,"2020-09-22T14:45:31Z","en","https:\u002F\u002Fmedia2.dev.to\u002Fdynamic\u002Fimage\u002Fwidth=1000,height=420,fit=cover,gravity=auto,format=auto\u002Fhttps%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Filxbfb890mzfcp132bed.png","https:\u002F\u002Fmedia2.dev.to\u002Fdynamic\u002Fimage\u002Fwidth=1000,height=500,fit=cover,gravity=auto,format=auto\u002Fhttps%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Filxbfb890mzfcp132bed.png","2020-09-22T14:04:39Z","2020-09-22T14:55:00Z","2025-01-21T09:45:17Z","systemdesign, server, loadbalancing, scaling",[24,25,26,27],"systemdesign","server","loadbalancing","scaling","\u003Ch2>\n  \u003Ca name=\"bulb-idea-behind-the-scaling\" href=\"#bulb-idea-behind-the-scaling\">\n  \u003C\u002Fa>\n  💡 Idea Behind the Scaling\n\u003C\u002Fh2>\n\n\u003Cp>Suppose I have a business application and I want to access it from anywhere over the internet, so I can make money. So, how I supposed to do that? I know you are brilliant and you have the answer. Yes!! I will rent a machine from a cloud provider and host it traditionally.\u003Cbr>\nAfter some days my app becomes very popular and so many people are using it. Now the real problem begins. People are facing downtime and I am losing customers 🤦. So, I asked one of my friends and he told me to scale up the machine to solve the problem.\u003C\u002Fp>\n\n\u003Ch2>\n  \u003Ca name=\"boom-what-is-scalability\" href=\"#boom-what-is-scalability\">\n  \u003C\u002Fa>\n  💥 What is Scalability?\n\u003C\u002Fh2>\n\n\u003Cp>Scalability is able to handle more requests with a bigger machine or adding more machines. There are two types of scaling,  \u003C\u002Fp>\n\n\u003Col>\n\u003Cli>Vertical Scaling\n\u003C\u002Fli>\n\u003Cli>Horizontal Scaling\n\u003C\u002Fli>\n\u003C\u002Fol>\n\n\u003Cp>\u003Cstrong>Vertical Scaling\u003C\u002Fstrong>\u003Cbr>\nIn one sentence, Buying a bigger machine called vertical scaling. I mean a single machine serves all the requests.\u003C\u002Fp>\n\n\u003Cp>\u003Cstrong>Horizontal Scaling\u003C\u002Fstrong>\u003Cbr>\nAdding more than one machine is called horizontal scaling. I mean you have already a machine and you add more machines with it to serve the requests. \u003C\u002Fp>\n\n\u003Ch2>\n  \u003Ca name=\"beers-pros-and-cons\" href=\"#beers-pros-and-cons\">\n  \u003C\u002Fa>\n  🍻 Pros and Cons\n\u003C\u002Fh2>\n\n\u003Cdiv class=\"table-wrapper-paragraph\">\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Horizontal\u003C\u002Fth>\n\u003Cth>Vertical\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>1. Load balancer required\u003C\u002Ftd>\n\u003Ctd>1. N\u002FA\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>2. Call over the network (Little Slower)\u003C\u002Ftd>\n\u003Ctd>2. Interprocess communication (Faster)\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>3. No problem until all the servers crash\u003C\u002Ftd>\n\u003Ctd>3. Single point of failure\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>4. Data Inconsistency\u003C\u002Ftd>\n\u003Ctd>4. Consistent\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>5. Nicely scale up according to need\u003C\u002Ftd>\n\u003Ctd>5. Hardware limits at some point.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\u003C\u002Fdiv>\n\n\u003Ch2>\n  \u003Ca name=\"rocket-conclusion\" href=\"#rocket-conclusion\">\n  \u003C\u002Fa>\n  🚀 Conclusion\n\u003C\u002Fh2>\n\n\u003Cp>So, now the big question is \u003Cstrong>Which one should we use ❓\u003C\u002Fstrong> My answer is \u003Cstrong>Both\u003C\u002Fstrong>. This actually depends on the system you are designing. Both the scaling system have some good sides. You just need to think about how much big a system you are going to build and how many requests you need to serve in each second and is it consistent to use this model. That it. You'll have your answer. \u003C\u002Fp>\n\n","## :bulb: Idea Behind the Scaling\nSuppose I have a business application and I want to access it from anywhere over the internet, so I can make money. So, how I supposed to do that? I know you are brilliant and you have the answer. Yes!! I will rent a machine from a cloud provider and host it traditionally.\nAfter some days my app becomes very popular and so many people are using it. Now the real problem begins. People are facing downtime and I am losing customers :facepalm:. So, I asked one of my friends and he told me to scale up the machine to solve the problem.\n\n## :boom: What is Scalability?\nScalability is able to handle more requests with a bigger machine or adding more machines. There are two types of scaling,  \n1. Vertical Scaling  \n2. Horizontal Scaling  \n\n**Vertical Scaling**\nIn one sentence, Buying a bigger machine called vertical scaling. I mean a single machine serves all the requests.\n\n**Horizontal Scaling**\nAdding more than one machine is called horizontal scaling. I mean you have already a machine and you add more machines with it to serve the requests. \n\n## :beers: Pros and Cons\n\n|Horizontal | Vertical|\n| --------- | --------- |\n| 1. Load balancer required | 1. N\u002FA |\n| 2. Call over the network (Little Slower) | 2. Interprocess communication (Faster)|\n| 3. No problem until all the servers crash | 3. Single point of failure |\n| 4. Data Inconsistency | 4. Consistent |\n| 5. Nicely scale up according to need | 5. Hardware limits at some point. |\n\n## :rocket: Conclusion\nSo, now the big question is **Which one should we use :question:** My answer is **Both**. This actually depends on the system you are designing. Both the scaling system have some good sides. You just need to think about how much big a system you are going to build and how many requests you need to serve in each second and is it consistent to use this model. That it. You'll have your answer. \n\n",{"name":31,"username":32,"twitter_username":33,"github_username":34,"user_id":35,"website_url":36,"profile_image":37,"profile_image_90":38},"Mohamad Ashraful Islam","ashraful","_ashraful","iashraful",30490,"https:\u002F\u002Fashraful.dev","https:\u002F\u002Fmedia2.dev.to\u002Fdynamic\u002Fimage\u002Fwidth=640,height=640,fit=cover,gravity=auto,format=auto\u002Fhttps%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F30490%2F9dc1ef64-0233-43b5-9127-79affd83cc43.jpg","https:\u002F\u002Fmedia2.dev.to\u002Fdynamic\u002Fimage\u002Fwidth=90,height=90,fit=cover,gravity=auto,format=auto\u002Fhttps%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F30490%2F9dc1ef64-0233-43b5-9127-79affd83cc43.jpg",1784633124083]