Levels of Web/Application
Đầu tiên đây là một chia sẻ cá nhân dựa trên hiểu biết của mình, mục tiêu là chỉ trả tiền khi thực sự cần với các dịch vụ cần thiết. Từ khóa: ai.
First, this is a personal sharing based on my understanding, the goal is to only pay when truly necessary for essential services. Hopefully, these sharings help you have more information to know when to use what appropriately. Avoid being scammed.
When touching upon the web, I am surrounded by concepts like domain, SSL, Proxy, VPS, Shared Hosting, Cloud Hosting... Then when needing to optimize speed, I have to touch upon CDN, Load Balancing... everything is a cost if not truly understood.
I temporarily divide web development into 2 stages:
- Create: Having a web for others to access, I write content (can post products)
- Improve: How to make my web load faster, not get overloaded when traffic increases highly. So what is the quick question here?
- Fast in which country (related to server location, CDN...)
- Fast with what task (load images, load videos, load product data...)
The article below provides concepts to help you visualize when you need the next level to calculate your investment.
Levels of web/application
We need to understand the nature of web access, which means you are letting others access data from your computer. These levels will be from the perspective that you own the hosting and development, you deploy everything yourself.
Level 1: Place everything on a single server
Take my case for example, having a computer at home and hosting this website. Currently, with very small traffic, I only need to store the entire source code on a single computer and set up a domain for external access.
)
Level 2: Separate servers to serve distinct purposes
When traffic increases or the website starts to scale its content, access and storage needs become more complex. At this time, it will be necessary to separate the data storage structure to avoid overloading the server.
)
This approach is similar to using another computer solely for data storage and processing. And these computers will communicate with each other to send information to you, the end-user, on another computer on the internet.
Deploy independent services
There are websites/applications that initially had to start at this level when built to ensure everything operates completely independently, not affecting each other when one of the systems overloads so users accessing other services are not stalled. This helps minimize impact when incidents occur.
)
Level 3: Separate into multiple physical servers in different geographical areas
At the next level, you are very concerned about:
- Website access speed at different geographical locations must be fast
- When incidents occur (natural disasters, wars...), my system can still be accessed normally
At this time, it will be mandatory to place physical servers in multiple different locations. You need to get used to the concepts of load balancing, traffic optimization algorithms.
)
But what if I only want to solve the problem of access speed across multiple countries? Renting a whole cloud to place servers is too expensive.
At this point, you can consider the immediate solution of using a CDN as an intermediary server to help distribute static content to appropriate geographical locations better.
How CDN helps accelerate website speed
CDN will connect to the origin server and create copies to store on their servers. Due to the nature of CDN PoPs spreading across continents, it will help your website be accessed faster for users far from the website's server.
There are many ways to use a CDN, you can route the entire site content through a CDN or by default put all images, videos... up here and when loading the page, these contents will be loaded separately simultaneously from many different servers to help the page load process happen much faster.
Detailed explanation by video related to software architecture
Full and extremely easy-to-understand explanation of how the web works
Conclusion
With this article, I hope to explain to those who are not very tech-savvy to roughly understand the concepts as well as when to use which service. Hopefully, this series of hosting and network articles can help you clearly visualize web development as well as the techniques behind it to be able to execute a desired project for yourself.