Backend Development 11 min read

Key Components of a Microservice Architecture: Nginx, Gateway, Service Registry, Cache, Database, Messaging, Logging, Scheduling, and Object Storage

The article outlines a comprehensive microservice architecture by describing essential backend components such as Nginx as the traffic entry, Spring Cloud Gateway, service registries like Nacos, Redis caching and distributed locks, MySQL persistence, Elasticsearch, message queues, ELK logging, distributed schedulers, and object storage solutions, while also noting related tooling and best‑practice considerations.

Top Architect
Top Architect
Top Architect
Key Components of a Microservice Architecture: Nginx, Gateway, Service Registry, Cache, Database, Messaging, Logging, Scheduling, and Object Storage

Microservice architectures are widely adopted, and this article provides a concise overview of the most common backend components that form a robust system.

Traffic entry – Nginx: Nginx serves as the external gateway, handling routing, load balancing, and static‑dynamic separation, typically deployed in multiple nodes with keepalived for high availability.

Gateway: Positioned after Nginx, the gateway (e.g., Spring Cloud Gateway) performs request authentication, routing, protocol conversion, and traffic monitoring. Alternatives such as Zuul, Kong, etc., are mentioned.

Business services: The micro‑services layer includes domain‑specific services like account, order, invoice, and cashier services, communicating via Feign with Ribbon for client‑side load balancing.

Service registry: A central registry (Zookeeper, Eureka, Nacos) registers all services to enable dynamic discovery; Nacos is recommended for its dual role as a configuration center.

Cache and distributed lock – Redis: Redis is used for hot‑data caching and as a distributed lock mechanism, with high‑availability achieved through Sentinel or cluster mode.

Data persistence – MySQL: Relational data is stored in MySQL with master‑slave and read‑write separation; scaling strategies such as sharding are discussed.

Structured data storage – Elasticsearch / MongoDB: For non‑relational or search‑heavy data, Elasticsearch (with DSL and GIS support) or MongoDB are suggested.

Message middleware: Asynchronous communication between services is handled by RabbitMQ or RocketMQ to ensure reliable message delivery.

Log collection – ELK stack: Logs from distributed nodes are aggregated using Filebeat → Logstash → Elasticsearch, with Kibana providing visualization and search.

Task scheduling: Distributed scheduling solutions such as Quartz (with DB), Elastic‑Job, and XXL‑JOB are introduced for reliable timed tasks.

Distributed object storage: Files are stored using MinIO, Alibaba OSS, or FastDFS to avoid local server storage limitations.

The article also includes promotional links and community invitations, but the technical sections serve as a practical guide for designing and operating a modern backend microservice system.

backend architecturemicroservicescachingMessagingNginxService Registry
Top Architect
Written by

Top Architect

Top Architect focuses on sharing practical architecture knowledge, covering enterprise, system, website, large‑scale distributed, and high‑availability architectures, plus architecture adjustments using internet technologies. We welcome idea‑driven, sharing‑oriented architects to exchange and learn together.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.