ANALYSING FEATURES OF E­COMMERCE SYSTEMS ARCHITECTURE

The object of the research is the process of designing the architecture of high­load systems. The conducted research is based on the system approach to design the architecture of e­commerce systems, characterized by high workload due to the large number of users working simultaneously with the system, a large amount of data and a significant number of complex calculations. The main hypothesis of the research is that the efficiency of such systems depends on the efficiency of each individual step to scale up the system and the consistency of these steps. The maximum efficiency can be achieved only if the resource constraints and requirements, which are determined by the key stakeholders of the projects, consider the specifics of the business system. This paper examines the methodological support of the developing high­load systems architecture. Within this research let’s analyze such specific features of high­loaded systems as scalability, rigidity, and response time and demonstrate the impor­ tance of considering these features when designing the architecture of high­loaded systems. This paper analyzes approaches to developing high­load systems architecture, their advantages, and disadvantages. It is suggested to use hybrid scaling method, which is based on combining two approaches – microservices and monolithic. It is also suggested to use a microservices approach for high­loaded and requiring scaling parts and a monolithic approach for non­loaded parts of the system. The research indicates the parts of the system that are usually highly loaded in e­commerce systems and require a microservices approach to design their architecture. This paper analyzes approaches to database scaling and organization of data replication. The application of the proposed approach to design the architecture of high­load systems, including the e­commerce systems, allows designing a system that can be easily scaled when necessary. At the same time, the system can be improved and further developed.


Introduction
The pandemic, quarantine restrictions and the necessity of organizing remote work have increased the demand for the development of ecommerce systems and business process automation. These systems are often classified as highload systems. Highload systems are applications with high workload, which occurs through: -many users simultaneously working with the system; -high volume of data to be processed; -the presence of numerous complex calculations [1]. The above factors are typical for highload systems, both separately and jointly. Such a system requires a significant number of resources to operate.
The development of highloaded systems has certain peculiarities [1][2][3]: -The main feature of highload business systems is their rigidity: it is possible to modify only some parts, because the flexibility of such systems requires a signifi cant number of resources. For example, it is impossible to make access to the data flexible. It is necessary to clearly define the database for the system to work with, considering the amount of data and the frequency of requests, in order to ensure its stable performance.
-The response time is another important factor. The interaction between users and the application is carried out by submitting requests, which should be responded to in a suitable time span.
-Scalability is a necessary feature for highload systems, which determines their ability to increase the maximum allowable workload (the number of users working simul taneously with the system, the amount of data, etc.). These peculiarities require critical analysis when develop ing the architecture of ecommerce systems. Therefore, the aim of this research is to develop the architecture of ecom merce systems, considering the peculiarities of highload systems operation. The object of this research is the process of developing the architecture of highload systems. TECHNOLOGY AUDIT AND PRODUCTION RESERVES -№ 1/4(63), 2022 ISSN 2664-9969

Research methodology
The conducted research is based on the approaches described in papers [2,4,5]. The key hypothesis of the research is that the efficiency of such systems depends on the efficiency of each individual step to scale up the system and the consistency of these steps. The maximum efficiency can be achieved only under consideration of resource constraints and requirements, determined by the key stakeholders of the projects, and the specifics of the business system. The principles of developing the archi tecture of highload systems, presented in papers [2,5,6], are analyzed. Based on this analysis and considering the architecture of data processing mechanisms and synchro nization of modules [4,7], database architecture [8], the necessity of using a systematic approach are determined to develop the architecture of highload systems.

Research results and discussion
Development of webbased applications is optimal solution to develop ecommerce systems. A webbased application is a clientserver application (the client is a browser, and the server is a web server) for which data is stored on the server, and data exchange takes place in the network. Their impor tant advantages for ecommerce systems are the following: -The system can be operated by a great number of users at once.
-They do not require installation on users' devices, thus they can be used whenever, and do not require additional workstations, increasing hardware power, etc. Users need only a browser and access to the Internet to work with the system. -Developing webbased applications is cheaper.
-All the updates and changes to the web application became automatically available for all users. A webbased application comprises the application code and database. When a user plans to use it, he or she sends a request to the server. The server processes the request, selects the necessary data from the database, generates a re sponse and sends it to the user. According to the results of research, the maximum time to perform these operations should not exceed 6 seconds for complex requests. Optimal average time to process a request for comfortable work of the user, which indicates the normal functioning of the system, is 3 seconds. A longer response time is unaccept able for such systems due to the high probability to lose potential customers.
Another important characteristic of the system per formance is a maximal number of requests processed per second (Requests Per Second (RPS)).
Therefore, the most important is scalability of the sys tem, which give opportunity to manage its performance indicators: the time of processing requests and RPS.
Let's analyze the approaches to scaling. There are two approaches to scaling [9,10]: -Vertical scaling involves increasing the capacity of some components of the system to increase the overall capacity. As a rule, vertical scaling is performed by replacing some devices with more powerful ones. This is the simplest way of scaling, which does not require any changes to the program.
-Horizontal scaling involves splitting the system into structural components distributed among different com puters and increasing the number of servers to perform specific functions in parallel. Consequently, the need to add nodes to the system, working as a single unit, and to modify the program for efficient use of the additional resources is evident. The development of a highload system requires a flexible approach to scaling and combination of both approaches. Obviously, the vertical scaling is not endless [11]. It is optimal to use it when the server is too old to bear the workload. Thus, it is quicker and cheaper to replace it with a new one, instead of changing the program code.
The horizontal approach to scaling involves splitting the application into several modules, which can be distributed among the servers, or multiplication of the highestloaded part of the application.
For example, the most loaded part of ecommerce sys tems can be the catalog. In this case, the task is to share the performance of this module between different servers, i. e., to organize parallel computing of this function.
This solution also has certain restrictions, because parallel computing creates the problem of data synchronization: each server, each stream, has its own data. They are no longer synchronized. The growing workload leads to a haphazard data state: users can change the same data simultaneously, but this situation is not acceptable. The synchronizer imple mentation removes the parallelism, but the load on the synchronizer grows. Therefore, the optimal solution is to isolate those highload components performed synchronously and to use a vertical scaling approach for them. Therefore, the second approach in combination with vertical scaling is optimal to scale highload systems. How ever, there is a mention that the application of this ap proach can differ for a particular system depending on its specific features and business requirements.
Another peculiarity to consider when scaling the sys tem is the load on the integrating module. The more the number of separate modules is, the more the load on the integrating module grows with the increase of the load on the modules. Obviously, the goal of scaling is to get a well performing system rather than a set of separate modules. Therefore, one should consider that the complexity of communication and load on the integrating module grow in geometrical progression with increasing the number of system modules.
In highload systems, it is also important to dupli cate critical components. All the critical components of a highload system, which affect its functionality, must be duplicated both in software and hardware (duplicate the equipment). These duplicates are not necessarily to work simultaneously, but they must ensure availability to use them in the case when the primary duplicates are not able to handle the load.
An important component of highload systems is the monitoring system. As a rule, problems in the system opera tion arise at moments of peak load, i. e., when the business earns the most. The monitoring system allowsto identify the issue causing the failure in the work, and immediately go to fixing these issues. Naturally, it is possible to identify the issue without the monitoring system. But in this case, it is necessary to involve highly qualified specialists and spend time to find the reason. Moreover, the monitoring system allowsto analyze the module's performance and pre vent possible failures, and thus minimize the probability of profit loss.

ISSN 2664-9969
The system's inflexibility allows to save money on equipment. The cost of the hardware for a highload system is always much higher than the cost of a typical application. When developing a flexible highload system, the number of required hardware increases significantly.
So, the first method to develop the architecture for ecommerce systems is the method of monolithic archi tecture: creating the program code using a set of plugins. Each plugin provides the implementation of a particular feature. For example, integration with external solutions, personalization of the payment terms, integration of pay ment systems, discount calculation system, etc.
An alternative approach is the microservice architec ture, under which the program is composed of a set of microservices and each microservice has its own database and operates independently. The advantage is the ability to develop, maintain, scale, and improve each of the mi croservices separately. But an important disadvantage is its cost. For example, to improve a particular microservice, it is necessary to analyze the code, make the appro priate changes, plan updates, test the system to ensure the ab sence of conflicts, prepare documentation, etc.
Developing monolithic applications is much cheaper, while they have a single code, and the application works with a single database. In the case of microservices architecture it is necessary to develop a protocol for interconnection with the core, the main product page, for each microservice. In this case, when processing a user's request, the program works with several databases of different microservices, all of which provide their own response to the request, which the application consolidates into a single response for the user.
It is obvious that the optimal solution is a hybrid (com bined) architecture. A monolithic part is developed for unloaded functions of ecommerce systems, and microser vices are developed for functions which are highloaded and could require scaling.
For ecommerce systems, as a rule, microservices are required to implement such functions: -catalog; -data buses for importing data from external software; -API for interaction with mobile devices and other services; -mailer and other services to communicate with clients.
The advantages of this approach are, foremost, reduc tion of costs for development and support of the system. The hybrid method requires less time for development, and it is cheaper. For that reason, it is the optimal solu tion for startup projects, companies with limited budgets, companies willing to test a business hypothesis, etc. More over, the application has no disadvantages in functionality and scalability.
An example of such hybrid architecture for an ecom merce system is shown in Fig. 1. Fig. 2 shows an example of the infrastructural archi tecture of the ecommerce system.
The principle of development and performance of such a system is as follows. It is recommend to use Python, Framework and Django within the development process, which is optimal regarding the development terms.
Microservices architecture is used to implement such functions: -notification service; -search engine based on Elastic Search; -product matching service (finding analogues for pro ducts that are not available in the catalog); -bus of input and output data processing; -Rest API; -signing documents with EDI. The PostgreS as a database of enterprise level with significant scalability is optimal for ecommerce system. Elastic is used to scale the catalog: all complex requests are sent to Elastic, and then the results of processing are shown in the catalog. Search within the system is fulltext and implemented with Elastic.
Data import is arranged using the Celery task broker. Each file for import or export is sent to the task bro ker, which creates a list of such files, and for each of them it determines the process, performing the im port or export procedure. This approach to organize data import and export enables horizontal scaling of this microservice.
Ecommerce systems, as a rule, have a complex struc ture of data storage, complex personalization logics, huge amounts of data. Therefore, inmemory database Redis is suitable for scaling the catalog, as it stores the data in the operating system in nonrelational form. The implementation of the log monitoring system en ables identifying errors in the system. Automated monitor ing of projects and errors allows responding immediately: to renew projects or, when possible, to fix errors. Simi larly, monitoring is used for integration processes with external programs and services. The system Jenkins could be used to ensure continuous integration of ecommerce system with external software. The integration with the accounting system to provide displaying realtime data on the availability and stock of goods can be an example. Another example is transferring information about orders from the ecommerce system to the accounting system for document processing, updating amounts of stocks, etc.
Scaling is implemented by containerization with the technology Docker. This system allows to quickly set up a server environment for web applications and control resources. The approach has a significant advantage com pared to virtualization. Virtual computers are created with software to perform some operations. As each virtual com puter requires a separate operating system, which runs on the server using its resources, the efficiency of using the server's resources is low.
Containerization, however, allows to place programs and processes in a separate container and reserve a certain number of resources for it, manage its performance, ac cessibility, processes, transfer the container among servers, perform monitoring, and so on.
The system Docker Swarm is used for orchestrationmanagement of containerization process. This system al lows to create clusters (sets of servers) and control their performance. The software is distributed on these clusters: the master application, the database and the microservices. Each element has its own cluster. The orchestration system Docker Swarm provide monitoring and management of the servers. When a cluster is unavailable, the system replaces containers to other servers and resumes their operation, thus ensuring the system's availability and continuity of its performance.
Moreover, the orchestration system allows online replica tion of data. Docker Swarm routes traffic in such a way: requests to read data go to the Slave database, and re quests to write data go to the Master database. At the same time, the Master database constantly transfers all the updates to the Slave databases. Due to regular rep lication in the cluster, there is always a stable version of the database to restore all the data.
The specific features of suggested architecture for the ecommerce solutions are relevant for the development of mobile and web applications. It is reasonable to use such principles to develop highload systems, or systems with the potential need for scaling. A probable develop ment of this research could be further improvement of the architecture with the aim of increasing the speed and permissible loads.

Conclusions
The paper analyzes the approaches to designing high load systems, their advantages, and disadvantages. It is suggested to use hybrid method for scaling, which is based on combining two approaches -microservices and monolithic. Microservice method could be used for high loaded and requiring scaling parts of the system, the monolithic method could be applied for nonloaded parts. It is found that usually highloaded parts of the system are the catalog, data buses for data import, API support for interaction with mobile devices and other services, and services to communicate with users. These are the parts of ecommerce systems requiring a microservices approach to develop the architecture. The paper provides analysis of approaches to database scaling and organi zation of data replication. Scaling can be implemented by tools of containerization technology Docker, and the management of the containerization process could be implemented using system Docker Swarm. The routing system distributes traffic from the application and send all the reading requests to the Slave database and all the writing requests to the Master database. The infor mation in the databases is constantly updated due to regular replication. As a result, the cluster always has a stable version of the database to restore all the data. The implementation of the suggested approach to design highload systems architecture, including ecommerce sys tems, enables developing a system, which can be easily scaled up anytime. At the same time, the system can be improved and updated.