摘要
针对微服务架构注册发现、负载均衡、可靠性保障和访问控制等问题,提出了一种分层的微服务框架.该框架自下而上分为数据层、基础层、服务层、业务层和表示层5个层次.在框架的实现过程中,通过采用开源分布式服务框架Spring Cloud,实现了基于Eureka的注册发现,基于服务实时变化的动态负载均衡,基于Hystrix的服务可靠性保障以及基于OAuth2的访问控制.最后基于该框架搭建了"北京大学校园移动信息服务平台".目前,该平台响应迅速,运行稳定,总关注人数已达到33 000余人,日访问量2 000余次.
Aiming at the problems of service registration and discovery,load balancing,service reliability,and access control in the microservice architecture,a multi-layer scheme of microservice framework is presented. Five layers are contained in the framework from bottom to top: data layer,basic layer, service layer,business layer,and user interface layer. During the implementation of the framework,the open source distributed service framework Spring Cloud is adopted,and service registration and discovery based on the Eureka,dynamic load balancing based on the real time change of the service,service reliability based on Hystrix,and service access control based on OAuth2 are implementated. Finally,Peking University campus mobile information service platform is designed and implemented based on the framework. At present,the platform is responsive and stable,the total number of people is more than 33 000,and the number of daily traffic is more than 2 000.
出处
《东南大学学报(自然科学版)》
EI
CAS
CSCD
北大核心
2017年第A01期48-52,共5页
Journal of Southeast University:Natural Science Edition
基金
国家自然科学基金资助项目(61602114)
关键词
微服务
服务注册
服务发现
负载均衡
服务容错
访问控制
microservice
service registration
service discovery
load balancing
service fault-tolerant
access control