• 微服务中心Eureka


    一、简介

    Eureka是Netflix开发的服务发现框架,本身是一个基于REST的服务,主要用于定位运行在AWS(AWS 是业务流程管理开发平台AWS Enterprise BPM Platform 业务流程管理开发平台)域中的中间层服务,以达到负载均衡和中间层服务故障转移的目的。SpringCloud将它集成在其子项目spring-cloud-netflix中,实现SpringCloud的服务发现功能。
              其实,Eureka就是一个专门用于服务发现的服务器,一些服务注册到该服务器,而另一些服务通过该服务器查找其所要调用执行的服务。可以充当服务发现服务器的组件很多,例如Zookeeper、Consul、Eureka等

    二、架构

    https://github.com/Netflix/eureka/wiki/Eureka-at-a-glance

    The architecture above depicts how Eureka is deployed at Netflix and this is how you would typically run it. There is one eureka cluster per region which knows only about instances in its region. There is at the least one eureka server per zone to handle zone failures.

    Services register with Eureka and then send heartbeats to renew their leases every 30 seconds. If the client cannot renew the lease for a few times, it is taken out of the server registry in about 90 seconds. The registration information and the renewals are replicated to all the eureka nodes in the cluster. The clients from any zone can look up the registry information (happens every 30 seconds) to locate their services (which could be in any zone) and make remote calls

    三、Eureka与Zookeeper对比

    Eureka与Zookeeper都可以充当服务中心,它们的区别主要体现在对于CAP原则的支持的不同。

    Consistency(一致性)、 Availability(可用性)、Partition tolerance(分区容错性)

    •  Eureka与AP原则
    • Zookeer与CP原则
  • 相关阅读:
    Jenkins 搭建篇
    gitlab搭建使用
    apiDoc部署搭建
    传统切图
    Web前端性能优化的9大问题
    photoshop cc 智能切图
    ps切图
    前端ps切图,图文教程,详细。
    axios
    数组API
  • 原文地址:https://www.cnblogs.com/edda/p/13263794.html
Copyright © 2020-2023  润新知