High-performance websites. Five key decisions at the design stage

Are you planning to launch a new website? Do you expect high traffic on your site? Consider performance optimisation at the design stage.
High-performance websites. Five key decisions at the design stage

A portal without solid foundations, combined with a sudden influx of users to the site (e.g. as a result of a promotional campaign), poses a risk of a '500 error' (server error). This results in costly downtime, frustrated visitors and stressed administrators. Not to mention wasted campaign funds...

Read our post to find out what to look for when searching for a provider to build a scalable portal that can handle heavy traffic.

In this post, you will learn, among other things:
  • what most often causes server overload,
  • what technical decisions to make to avoid a 500 error,
  • how to design a scalable architecture step by step.

Lack of server resources – what are the most common reasons?

Before we move on to what to look for when planning an efficient portal, let's take a look at the basic reasons for overload. This is important information if you want to know what to avoid.

Server resource overload
Lack of computing power (CPU)

Your server may simply not have enough power to handle so many users at once. Every click, every page load requires the server to perform certain operations. With high traffic, the server's processor can reach 100% utilization and be unable to handle new requests.

Lack of RAM
Web applications need memory to store temporary data and perform operations. Under heavy load, RAM may run out, slowing down the server and eventually leading to a crash and a 500 error.

Network bandwidth limitations
If many users try to download large files (e.g., photos, videos) at the same time, the server's network connection may become overloaded.

Database problems

Database overload
Your website probably uses a database to store information about products, users, orders, etc. High traffic on the website generates many queries to the database.

If the database is not properly optimized—for example, it allows too few simultaneous connections, queries are too slow, or the server has too few resources—overload may occur. As a result, the system cannot keep up with responses, and users see a 500 error.

Database lockups
During heavy traffic, there may be situations where multiple queries attempt to modify the same data in the database at the same time, leading to lockups and slowdowns.

Errors in the application code 

Inefficient code
Some parts of your website's code may be written in a way that consumes a lot of server resources, especially when there are a large number of users.

Uncaught exceptions
There may be errors in the application code that are not visible under normal conditions, but when under heavy load, they become apparent and cause a crash.

Server configuration issues

Incorrect limit settings
The server may have limits set too low for the number of simultaneous connections, script execution time, etc. Under heavy load, these limits may be reached, resulting in 500 errors.

Errors in server software configuration (e.g., Apache, Nginx)
Incorrect web server configuration can cause problems when handling a large number of requests.

5 pillars of performance – build a portal ready for anything

When building a portal, you only have one chance to lay a solid foundation. If you skip issues such as architecture, optimization, or testing at the outset, you may quickly find that your website cannot handle real traffic.

Below you will find a practical summary of 5 key areas that you need to pay attention to if you care about performance, scalability, and peace of mind after launching your portal.

1. Choose a scalable architecture

If you build your portal on flexible foundations from the outset, you won't be surprised by an increase in traffic. Why is this one of the most important decisions you will make? The architecture is like the skeleton on which the portal will be built. This decision cannot be easily changed once the project has started. What should you pay attention to in this regard?

Microservices
Instead of a monolithic application, consider an architecture based on microservices. Each functionality (e.g., product catalog, shopping cart, payment system) works as an independent service. This means that if one function is under heavy load, only that specific service can be scaled without affecting the rest of the application.

Imagine that your store has separate checkout stations, warehouses, and customer service departments. If interest in one product suddenly increases, you can add more checkouts without paralyzing the entire store.

Task queues
For operations that do not need to be performed immediately (e.g., sending emails, generating reports), use task queues (e.g., RabbitMQ, Kafka). In the event of a heavy load, tasks are placed in a queue and processed asynchronously, which prevents web servers from becoming overloaded.

2. Optimize at the code and database level

The performance of a portal consists of a number of interconnected elements. Even the most powerful server will not help if the application itself is not efficient. Optimization should be part of the entire life cycle of a portal – from design, through development, to maintenance.

Regardless of whether you outsource the project to an external provider or work with your internal IT department, emphasize the following requirements in particular. There are several key factors here:

Efficient code
Ensure that your application code is written in an optimal way, avoiding unnecessary operations and database queries. In addition, make sure to regularly audit your code for performance.

Database optimization
Design the database schema with query performance in mind. Use indexes, optimize SQL queries, and consider data caching mechanisms.

Caching at different levels
Introduce caching mechanisms at different levels:

  • Browser cache Set appropriate HTTP headers so that users' browsers can store static resources (CSS, JavaScript, images) locally.
  • CDN (Content Delivery Network) Use a CDN to host static resources on multiple geographically distributed servers. This allows users to download these resources from the nearest server, which speeds up page loading and reduces the load on your main server.
  • Server cache (e.g., Redis, Memcached) Use server-side caching to store frequently used data (e.g., database query results, generated pages).

Resource compression
Compress text files (HTML, CSS, JavaScript) and images to reduce their size and speed up transfer. 

Lazy loading
Use lazy loading for images and other elements that are not immediately visible when the page loads. This ensures that these elements are only loaded when the user scrolls near them.

3. Choose the right infrastructure and cloud provider

A robust infrastructure ensures that your portal won't crash during sudden traffic spikes. Choosing the right cloud environment and configuring it properly has a direct impact on the availability and response time of your website.

Cloud computing
Choose a cloud computing provider (e.g., AWS, Google Cloud, Azure) that offers flexible and scalable resources. This will allow you to easily increase computing power, memory, or network bandwidth as needed. 

Auto Scaling
Set up auto scaling to monitor your application's load and automatically add or remove server instances as needed. This will ensure that your website can handle sudden spikes in traffic without manual intervention. 

Load balancing
Use a load balancer to distribute traffic across multiple server instances. This ensures that no single instance becomes overloaded and users are provided with continuous access.

4. Monitoring and alerts – your eyes and ears

You can't manage what you can't see. Real-time monitoring is the foundation of a stable and efficient portal. It also gives you peace of mind and confidence that everything is working as it should, and in the event of an anomaly, you can take immediate action. What should you pay attention to?

Comprehensive monitoring
Implement monitoring systems that track key performance metrics of your application and infrastructure (e.g., response time, resource consumption, number of errors). 

Alerting
Set up alerts that will notify your technical team if any worrying patterns are detected or thresholds are exceeded. This will allow them to proactively respond to potential problems before they lead to a failure.

5. Regular load testing – better before than during the campaign

If you are planning high traffic, check in advance whether the system can handle it. Is this a mandatory step? Yes. Interestingly, it will happen regardless of whether you plan for it or not. If you don't identify bottlenecks during load testing, your users will.

Regular performance testing
Conduct regular load testing to simulate high traffic and identify potential bottlenecks in your application and infrastructure. This will allow you to detect problems early and resolve them before real load occurs. 

Tests can be scheduled periodically, e.g., before campaigns or quarterly. It is good practice to run scenarios at 3-5x the standard traffic to see how the system responds in extreme situations.

An efficient web portal – summary

Ensure efficiency right from the design stage. This is the only way to match the platform's capabilities to the scale of its operation and avoid unpleasant surprises. Pay particular attention to:

  • microservices – they allow you to easily scale only those elements that are most heavily loaded,
  • efficient code – a well-written backend and optimized database queries are the basis of performance,
  • caching – reduces server load and speeds up content loading,
  • scalable infrastructure – automatically adapts to changing traffic levels,
  • monitoring and alerts – allow you to respond before users notice a problem,
  • load testing – helps detect bottlenecks before real traffic does.

Regardless of whether your website receives 5,000 or 100,000 visitors per hour, you can be sure that it will run smoothly and without errors. And that's what it's all about – technology that is invisible to the user and reliable for your business.

Would you like to analyze the performance of your portal? Write to us. We will identify specific areas for optimization and advise you on how to approach scalability without overloading your servers.

    Case studies

    See all
    Saint-Gobain

    The TADMAR Installation Center is a part of the global Saint-Gobain industrial group. The company is a wholesale warehouse for heating, installation, and sanitary products. The sales network of 53 retail outlets makes them one of the largest...

    See more
    LOTTO

    Lotto is one of the most recognizable and distinguished Polish brands. Totalizator Sportowy (operator of Lotto.pl) has been operating for over 63 years. It has a network of over 17,000 points of sale, which offer a wide range of lottery products...

    See more
    Santander

    Santander Consumer Bank belongs to one of the largest financial groups in the world and received the ‘Customer-Friendly Company’ emblem for the second year in a row. To increase the level of client satisfaction, the Bank decided to update its...

    See more
    Volvo

    The Volvo Cars has been producing passenger cars since 1927. The company focuses on high quality and reliability of its own vehicle structures....

    See more
    Stock Polska

    Stock Polska is a leading company in the alcohol industry in Central and Eastern Europe. Since 2007 it has been an important part of the international Stock Spirits Group. Famous brands of Stock Polska are leaders in their categories like Pure de...

    See more
    B2B Ecommerce platform (Magento) for...
    Brand new website for Lotto.pl - Polish...
    Corporate website for Santander Consumer...
    Intranet Platform for Volvo
    Invoice workflow management system for Stock...
     
     

    Contact us

    ×

    Please describe your needs. We will contact you back as soon as possible.