And when a user wants to request one of these resources, the request that they are sending will travel to the closest node of the network. So let's say that I live in Argentina and I have one of the nodes of this network in Brazil. Instead of sending my request and having to go to a web server located in the UK, let's say, my request will travel to the Brazil node of the network and then I will get all the resources from that node. This helps to reduce the bandwidth consumption because we won't be accessing all the users or all the visitors to the same web server, and we will have a better performance because of this and because of the request having to travel less, let's say, going to the closest node of the network. I mean, depending on your location, depending where the network has these nodes, and there will be more security because instead of accessing to the origin of the data or the content, your request will travel to different nodes without having to know which is the actual web server that is hosting your website.
Because one thing that I mentioned and you have to consider is that these CDNs, they work with static assets. That means that if we need to generate dynamic content or dynamic assets, or we need to generate these assets dynamically, somehow based on a logic that depends on the user, we will still need the origin server to do that. So as I was mentioning, these CDNs work with static content. That's why a new term was developed with the ERs, the static site generation. You may be familiar with frameworks like Gatsby or NGJS where you can generate static assets at build time, JavaScript files, CSS files and HTML files. The idea of this is that you are able to create a website that can be host in these CDNs, so you don't depend on an origin server. And having the same idea in mind, the concept of the JAMstack was developed, where the idea was to focus most of the logic of your websites on the static assets and managing the dynamic data with different approaches like APIs, serverless function, or small pieces of code that is running server side, but not your whole website living on the web server or having to wait for each request to be processed to return or deliver this content. But as you can see, there there's another issue now. And the issue is that we can only manage static content with the CDNs. So as I was mentioning before, if we need some dynamic data, or we need to generate a certain asset, that is not living or is not cached on the nodes of the CDN, we will have to send the request to the origin server. And there's where the performance issues start to appear again. We are lacking the security and the performance that we have with a CDN.
So having this issue in mind and other ideas and approaches and always trying to improve the situation, of course, the IT industry came up with a new concept, the concept of the edge. The edge is basically a distributed network architecture where the client data is processed as close to the originating source as possible. So that means that if we will use some data coming from our users or some context from our users, we can grab that context as close as possible from them the server-side logic closer to them, instead of having to send the request and all that information to an origin server and wait for the processing. So in this case, what we will have is basically using the same distribution that we had for a CDN, we will have different origin servers in the different locations. So if I need to process data coming from the users and I have a user from Argentina wanting to request a certain resource or sending a request, that request will be processed in the closest node of my edge network, which in this case could be again, Brazil, let's say, instead of having to send that request to one unique origin server that is living in a particular location of the world. So in this case, we will have our origin server replicated in different parts of the world, processing all the requests that are coming from the different users. One thing that you have to keep in mind is that when we are talking about the edge, it's not the same the edge as a serverless function, because even though that we will have some of the benefits that we have with the serverless functions, like we won't need DevOps because the servers are going to be managed by the provider and we are only going to pay for what we use. I mean, instead of having to pay for a dedicated web server, we will have our processing time defining how much we are going to pay for that. So that means that we won't have under utility of the web servers because the only processing that we will have is when the requests are coming and are being processed and executed. I mean, all of these are aspects that we can identify and consider on serverless functions. The thing is that the Edge is not only this because a serverless function can be deployed to a centralized web server. And if that's the case, we are going to have the same issue that we had before with the origin server. I mean, the unique origin server.
Comments