With the continuous development of e-commerce systems, data storage has become a crucial technology in this era, and building a database environment with high-availability has become an urgent demand of many enterprises. In order to prevent web application crashes caused by database server downtime, this paper proposes a database architecture of e-commerce system with high availability and scalability based on MySQL and Redis. The architecture implements read-write separation and automatic switching when the server goes down to ensure high availability of e-commerce systems. It uses the sentinel to build Redis cluster, while reducing database access pressure and preventing cache invalidation caused by Redis server downtime. It builds a database cluster based on MySQL replication, which can ensure real-time synchronization and disaster recovery of data between database servers and improve scalability of system. Finally, this paper implemented an e-commerce system based on this architecture.
Beijing University of Posts and Telecommunications,Beijing 100876;Beijing University of Posts and Telecommunications,Beijing 100876,