Optimizing server infrastructure

Strefa Tenisa

If e-Commerce wants to grow and gain new markets, it is important to take good care of the server infrastructure on which the shop is located. This need is perfectly understood by Strefa Tenisa, which at the end of 2016 decided to switch from a standard server solution to cloud computing.

Task due to its dynamic growth (in September 2016 it launched its new Strefa Squasha brand), entrusted us with the task of optimizing their server infrastructure, which had to meet the following requirements:

  • reliability
  • efficiency
  • scalability

The need to reorganize servers has been born of the fact of launching a new brand, but also in response to the ever-growing number of e-Commerce customers, which generates periodically high volumes of traffic on the store (eg, during a sale). As the Strefa Tenisa puts a strong emphasis on e-business development and customer satisfaction, our task was to organize the infrastructure so that additional server load would not adversely affect the functioning of the store.


Classic server infrastructure

The biggest challenge was to reorganize and propose a new hosting strategy for the client. So far, the store application has used the standard solution, one physical server machine.

This stopped being right at the moment when the customer decided to dynamically grow its business. The classic server managed well with organic and slow growth in store traffic (it had enough power to handle such growth), but already in the case of various actions that resulted in the emergence of a large number of customers in a short period of time, we had to opt for a more flexible and scalable solution.

Of course, we could have chosen go to a more powerful machine or strengthen the infrastructure with a few traditional servers, supported by a service redundancy system, and a mechanism for scattering traffic between machines. The problem was that this strategy would only remove the problem in time. Both solutions in a relatively short time would also be insufficient and they would not have the resources to properly maintain the store. We wanted to avoid this and that is why we offered the customer a completely different approach.

Server in the cloud

In the new deal we set up servers on the Oktawave cloud .We decided on their solution for two reasons.

Flexibility of solution

The OktaWave administrator panel has many tools to facilitate and automate even complex administrative tasks, and allows you to build almost any custom server infrastructure. The operator has the ability to use default server instance templates or create custom ones based on standard distributions – Debian.


This tool allows us to automatically adjust the resources of specific servers, depending on the volume of traffic on the store. Autoscaler constantly monitors server loads and increases their computing power and the amount of available memory. This works without restarting the machine.

On the other hand, when you need to reduce resources, you have the ability to set such a process at a particular time, such as at night, and the redundancy of individual components of the infrastructure allows you to restart individual machines imperceptibly for the customer (Web site user).

New server infrastructure of Strefa Tenisa

In a nutshell: online store, substantially its application, has been scattered into seven virtual machines within the OktaWave infrastructure.

Strefa Tenisa application
  • The first element of the infrastructure is the gateway. It is a kind of HAProxy based router that scatters traffic across web servers depending on your needs, available resources and preferences.
  • A key part of the optimization was to scatter traffic to three virtual servers responsible for serving web pages. There are a lot of them because they are responsible for the proper functioning of the Strefa Tenisa during the hottest promotions that attract numerous clients to the store.
  • The fourth web server is dedicated only to photos. The static file server requires a different configuration than the server responsible for dynamic page generation. Even if it stops working for some reason, the remaining three servers will undertake this task.
  • The database server is on a separate machine that has been optimized for this specific task. It has fast disks (Tier 3) and memory so that the database does not need to compete with other services. This resulted in the database server responding to inquiries without any downtime, even during the moments of the store's most intense promotional activities. As part of this element, we also used an autoscaler, but in this case the machine only has the ability to raise the parameters of the server without reducing them. Due to the lack of this mechanism, we wanted to have full control over database reboots and, consequently, its availability when it generates a higher load than usual. The virtual servers responsible for the operation of the store do not suffer from this phenomenon, and e-Commerce functions without any problems.
  • NFS / memcache server, is a common file resource for web servers. Theoretically, memcache, which is used by web servers, should be on the same machines as Apache from PHP, but by performing performance tests, it turns out to be of minimal importance. As a result, we were able to carry out the entire modernization with less financial cost to the customer.
Strefa Tenisa application

End Result

The transition to cloud computing involves three main benefits for the Strefa Tenisa.

  • We are much more capable to identify elements that are the most burdensome for e-Commerce infrastructure. We can direct customer traffic in the shop between machines and determine which types of requests to the servers consume the most resources, such as running a "product card" page from one particular web server, and investigating the load generated by this store element.
  • We react dynamically at the moments of the largest traffic and quickly allocate the necessary resources to the proper operation of the store. Before moving the server, the sudden growth of traffic although by several times, was a problem. Now we are not afraid of growth even by several dozens or hundreds of times. We are talking about the number of people browsing the store at one time - see Google Analytics, the "Live" section.
  • We can comfortably do the administrative task on the server, because now we don’t need to shut down the whole store, just one of virtual machines. Thanks to that clients of Strefa Tenisa don’t hit the break in the store access.