Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What should be paid attention to in building a micro-service architecture?

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

1. Build the foundation of micro-service architecture

The choice of service-oriented framework and platform

two。 Micro-service public concerns

1) configuration management: configure some variable parameters of micro-service applications. These parameters may be configured at one time during startup (for example, database connection string), or dynamically configured at run time (for example, adjust cache expiration time, or the number of business promotion restrictions).

2) Service Discovery and LB (load balancing):

Service discovery: services are distributed on different nodes, and if services want to invoke each other, they must first locate and find each other, a basic problem of micro-service architecture.

Load balancing: services are generally deployed in a multi-instance manner, and callers need to use a certain load balancing strategy to access the target service implementation.

3) resilience and fault tolerance: distributed micro-services are interconnected through networks, the network may be unstable, and service instances may cause delays, errors, or even downtime, so micro-service systems must be resilient and fault-tolerant to ensure service quality and user experience.

4) API management: micro service system, which exposes API and is generally managed through API gateway. Gateway is a gate of micro service, which needs to support basic functions such as reverse routing, security authentication, log monitoring, and fault tolerance. Advanced gateways should support advanced functions such as Aamp B test, blue-green and grayscale testing.

5) Service security: users need authentication to access micro-services, authentication to operate on some sensitive services, and permission control to invoke services.

6) Log monitoring: service access logs need to be collected, stored and analyzed centrally to facilitate further analysis of service performance and even user behavior.

7) Metrics monitoring: Metrics monitoring is required for the call to micro-service. Metrics monitoring can not only monitor the performance of the service (including calls, delays, errors, etc.), but also monitor some important business indicators (such as the number of logins, the number of orders).

8) call chain monitoring: the dependency relationship between distributed micro-services is complex. Through call chain monitoring, we can grasp the dependency relationship between services and the performance of calls between services in real time. When there is a problem, we can solve the problem in time by analyzing the call chain.

9) scheduling and publishing: micro-services eventually need to be published to the generation environment. Currently, the recommended means of micro-service interaction are mainly container cloud environment. Container cloud needs to support automatic container resource scheduling and publishing, and advanced publishing mechanisms such as scrolling, blue and green.

10) self-healing and automatic scaling:

Self-healing: in the cloud environment, this node instance may go down or drift, and the network may avoid instability. The micro-service platform needs automatic detection capability and can recover automatically.

Automatic scaling: user traffic may burst and soar. Ideally, the micro-service platform needs to automatically scale (auto-scaling) according to the changes of users' traffic.

This saves hardware resources without affecting the user experience.

3. Comprehensive horizontal comparative analysis of the three

4. Advantages and disadvantages of the three

5. Use suggestion

1) Micro-service concerns, based on enterprise context

2) try not to mix and match to maintain the consistency of the system

3) personal inclination towards K8s+SpringBoot

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report