摘要
微服务架构本身具有业务独立、开发部署相对灵活等优点,但也因网络调用和服务间的复杂依赖关系导致的响应超时和服务故障等问题。本文首先介绍了高并发背景下微服务架构项目可能出现的延时响应和系统瘫痪等问题,然后介绍了针对这些故障的解决办法,即在某个微服务单元出现请求响应超时或者请求过载问题时采用断路器模式来结束等待并立即返回给调用方一个错误响应。最后给出了在SpringCloud微服务框架下的断路器Hystrix技术的具体思想和实现。
The microservice architecture itself has the advantages of business independence and relatively flexible development and deployment,but also has problems such as response timeouts and service failures caused by network calls and complex dependencies between services.First,This article introduces the problems of delayed response and system failure that may occur in microservice architecture projects under the high concurrency background,Then,this paper introduces solutions to these failures,that is,when a request response timeout or request overload occurs in a microservice unit Use circuit breaker mode to end the wait and immediately return an error response to the caller.Finally,the specific ideas and implementation of the circuit breaker Hystrix technology under the framework of SpringCloud microservices are given.
作者
迟殿委
孙丽霞
CHI Dian-wei;SUN Li-xia(Shandong Vocational University of Foreign Affairs,Weihai,Shandong 264504,China)
出处
《新一代信息技术》
2019年第23期30-34,共5页
New Generation of Information Technology