Full-service software development company
SDH Digital solutions blog

What to know before building a high load website

Dmitry Drigo
CEO of SDH Digital Solutions, LLC
If you want to be successful in business nowadays, you need to create your own website. And when it becomes popular and in high demand, you should expect serious problems with loading pages. In this article, you will find out everything you need to do and how to avoid such a situation.

What to know before building a high load website

If you have a multitude of users on your website every day, that's great. This is even better if they turn into potential, and then to regular customers who are willing to leave requests, buy something and are ready to subscribe to the mailing list.

However, a large number of visitors are almost always accompanied by high traffic congestion. Due to the large number of visitors, pages tend to take a long time to load, or do not open at all. Which means that sales are falling along with servers.

Building a website is a demanding and creative process. Many companies are worried not only with the original design and corporate colors, but they are also willing to spend on an unusual interface with animation or clinging content.

Then it is loaded with catalogs of products, videos and much more. Programmers have to try to make sure that in the end the website is not just working but all its pages and sections are running steadily.
The task is sometimes difficult, because you need to create a website that will not just fit within the established budget but will please the customer. You need to make a fast project that can resist the onslaught of tens of thousands of users per minute.

In this situation, experts talk about high load sites. What is it all about?

We are talking, of course, about websites and Internet resources, which are visited by a huge number of people every day. From this traffic the website "falls".
Reasons for high traffic:
• traffic, or rather a large volume in a short period of time (for example, over 100,000 per second);
• functionality, too energy-intensive and resource-intensive;
• file system or storage (something is being downloaded or uploaded);
• a database (hackers, for example, shallots).
Any Internet website may be subject to high and ultra-high levels of traffic, but not all can withstand them due to vulnerabilities or design errors.
But there are ways to fix it and to prepare the website for any number of visitors and work swiftly under any traffic.

For example, creating a high load website, as well as a system that will work without errors and failures. And in parallel on several servers and able to expand the number of servers in the future to improve performance.
In simple words, to overcome the traffic you need to divide the servers so that one or more servers serve one part of the users of the site, and the other part, etc.
With the growth of users, you will be able to rent or buy additional equipment for new traffic and the system will further independently distribute the traffic and data to ensure that the productivity of the website grows linearly.

This method of traffic distribution is called "horizontal scaling".
It is worth mentioning a little bit more, as scaling is very important to think ahead. This will avoid many problems in the future.

Any large project begins with the correct scaling, in order to be able to make adjustments to the existing site, and the system will be complex or costly.

What is its importance? Increasing the modules for the same functions or tasks, allows you to increase the ability of the website to withstand high demands.

One of the simplest solutions is to increase the capacity of the server, for which it is enough to update the ISP. The problem is solved, but only temporarily. On a global scale, the purchase will not be an adequate measure.

It is better to create a stable and flexible system on your own.

Where can one begin to scale up? With the structure, of course. Each website has a standard architecture for interaction, which does not prevent you from doing something special.

For example, the division of the project into basic modules. Such as: database, back-end and front-end.

This will have a big advantage, because not only the navigation is improved, but the system itself will be more flexible for scaling in the future.

How to make a scalable site

1) Give preference to servers that process each request as a separate process. But as a result, the database may not be able to handle it, so it can be moved to a separate north.
2) Scale the back end part to significantly increase the speed. Leave the front-end on the same server.
3) Move the file storage to a separate server to reduce the load on the main server.

Now, in order.

Scaling back-end

A large website (e.g. a store) usually has an enhanced back-end because it handles complex calculations. And it is the first reason why the website is slow.

At working out of such large project it is necessary to think over how to optimize inquiries and to use server productivity rationally. Perhaps to reduce the growing traffic on back-end, you should scale and divide this part into several different servers.

For temporary traffics, increasing the server capacity will help.

Scaling up the database

It is desirable to keep the database on a separate server, but if it fails, then this cluster should be scaled as well.

Approaches for scaling databases:

1. Distribute computational processes.
Suitable for small bath bases where you can divide the calculation process. The method is quite complicated and requires synchronization between servers. What can be achieved by synchronization at the application level, where scripts automatically write
down each copy of the database. But the slightest failure leads to data loss.

Or try replication when changes to the database occur on the master server and after it automatically changes it to other servers.

There is also a variant of multi-master replication, where scripts refer to any server for data matching and updating.

2. Split the databases.
If there are not many calculations in the database and there are many records in it, it is better to place the database not on one server, but to divide it into several.

In such a system the servers will individually store only part of the data, but at the same time interact with other servers.

Data distribution schemes can be: vertical partitioning or vertical and horizontal partitioning or horizontal.

Distribution of requests between servers

If there are several servers in the system, it is necessary to correctly distribute requests between them. Or bring them into balance.

Only two methods exist for balancing:
1. The balancing node, where when interacting with the primary server, the latter determines which server to send the request to;
2. Client side balance, which is to use client data and then automatically distribute all requests.

In summary, large projects always work under tremendous load, and the correct scaling helps to create a system that can withstand millions of visitors without any problems.

Thus, without scaling it will be extremely difficult to create a high load website.
In summary, large projects always work under tremendous load, and the correct scaling helps to create a system that can withstand millions of visitors without any problems.
Connected articles

Schedule A Personal Consultation With Our Solutions Architect

We can help you identify optimal technologies, calculate cost and timeline estimate for your project, or simply consult you on any IT question at no cost.
Keep in touch.