Konabos Inc. - Konabos
28 Oct 2021
In this video, we talk about Globally Scaling your Application. We explore the different types of scaling used in both Monolith systems as well as the Jamstack architecture.
Note: The following is the transcription of the video produced by an automated transcription system. Akshay Sura: All right. We are talking about globally scaling applications today.
Kamruz Jaman: Yeah, it's not just, yeah, to a certain extent, it's not just globally scaling, right, it's also about just. Scaling in general, right? So with our traditional systems like traditional monoliths, systems, we. We tend to have a set of servers which will serve up the content right, and from our talk last time we talked about the multi-site deployments, but with the multi-site deployment kind of comes into this as well, right? Because as you add more sites, you add more load, you need to scale those servers or you have some sort of event, you start to attract more people onto your sites. We've seen this where a lot of our customers, right, because they have a sale or something like that. We had one health care customer a few months back where they started to offer the COVID vaccine, and the site just got overwhelmed because. Hey, everybody wants to go and get the COVID vaccine, right, so demand goes through the roof, and so the traditional ways to scale this is to initially scale up so you would try to add more. Ram, more CPU, more bandwidth and then you scale out, so you add more servers to that to that load. Now the problem is when you get to geo scaling, it becomes more tricky because. You have customers throughout the globe, and if you have a multinational corporation, they're serving customers all over, all over the globe and they want each of those customers to have an equally great experience will come to the site, right? And this is really just purely the laws of physics, right? The further you are away from the server, the longer it's going to take for something to for that request to get served to you.
Kamruz Jaman: It's like. It's like having a really long hose when you turn, if you have a really long hose and you turn it on at the tap, it's going to take a while for the water to come out the other end. And if you have a shorter hose, then it's going to come out much more quickly, right? The water is going to start to come out the other end much more quickly. Now, when you go to geo scale, you know, I've got to think about I need more servers and all of these different locations, so I've got to scale up their servers. So she's going to cost me a lot of money. I then need people to. Manage those servers, right? So, you know, I need more people to manage those servers. I also need to worry about like if I'm doing the traditional, you know, virtual machines or stuff, I got to updates and all of those kind of things. And deployments on top of that become more tricky from a from a code and infrastructure point of view.
Kamruz Jaman: I've now got to think about deploying up to multiple different regions and load balancing and things like that. And we try to mitigate those as much as we can by having by using a CDN where we can and that will generally be. We try to offload things like videos and some of the media and things like that. But the raw request is still coming from your main server because we are serving dynamic pages. There's no way around that. It has that that request has to go back to the origin server. And that's just nature, nature of how those traditional systems work. Now the Jamstack approach is slightly different, right? So we will like we traditionally been using Vercel but we've also used Netlify like a lot and it's. It's funny, right, because some of our customers are very regional, but some of our customers are global. But even for the regional customers, they get the scaling out of the box. I deploy to Vercel. I'm scaled to actually start to go global. I can. Like anybody who's visiting the site from Australia is going to have the same experience as somebody who's visiting the site from the U.S. or North America. It's just scaled out of the box. So that's just the nature of the Jamstack approach.
Kamruz Jaman: You know, you're building out static pages, there's no processing to do so. I can just deploy it. I can replicate that across the globe into all of their content delivery network nodes. And everybody has it. It's just boom. It's ready to go and, you know, add into things. Adding to that, things like the incremental static regeneration and then you have a bit of a best of both worlds scenario there, where you can have dynamic content being built for the site, but still being served as you would with static content. And I don't have to manage any of this. I just deploy. I just have my referral code here. I have my headless CMS over there and my DCS wherever they are compatible components, wherever they're sitting. And I just give it to hustle and bustle would do the build and the deployments and the hosting and the content delivery network push, right? Yeah. And that's on top of all of the other benefits that we do get with the Jamstack approach, such as such as like high security, lower costs and better speed, right? So what we are doing essentially is using the CDNs, right, so depending on who you provide a result, they will probably be piggybacking off another CDN provider or have all of these pop nodes all across the globe.
Kamruz Jaman: So when a when a user is making a request, it's coming from their closest data center so that delivery time isn't, isn't as long to that user. It's scaled. And then we can make we love using azure functions. You can use a number of the other providers also have worker functions, so any of the dynamic parts of your of your application or your site can still grab the dynamic data using those azure functions. And again, those are scale really nicely, but just by the very nature of being serverless as well. So you get the static part of the site being deployed from the city and you get a dynamic pass from whatever your serverless functions are gives you a truly global and infinitely scaled application without having to put in lots of infrastructure. Put in lots of additional overhead on the architecture, either. And at the end of day, nobody likes to wait, everybody just wants that really, really quick and fast delivery. Nobody wants to be waiting for waiting to get that web page served, right? No, not at all. Akshay Sura: So like from scaling being performant and cost efficient. One of the few other things which every one needs, regardless of. If it's the marketing guy asking for it or the developer asking for it, that's what the business needs. All right, thank you so much, Mr. Kamruz.
If you have any questions, please get in touch with me. @akshaysura13 on Twitter or on Slack.
Yay to Konabosing in style! Content tagged with the Konabos handle is produced by two or more Konabos team members.