Chapter IV Management Services

  The key is service-oriented service management.

  Service management including service discovery, load balancing, current limiting, fuse, timeout, retries, tracking service .

  4.1 Service Discovery

    If fewer services, can provide service through hard-coded addresses or configuration file. But the face of on-line services to deploy a large number of examples and frequent service between each other if you want to know the address of the service and running, this time you need service discovery component to achieve.

    4.1.1 Service Discovery Overview

      Use a registry to record all service information distributed systems, so that other services can quickly find these services have been registered. To try to make it highly available.

    Service Discovery module requires service registration, service discovery, service health screening and services change the key functions of notification.

      You can find and use by the service name, without providing network address and port number.

      DNS can be said to be the earliest example of service discovery.

      Micro-service updates, frequent, and often elastic stretch according to the load, so the micro-services IP address change is the norm.

      The basic service discovery mechanisms:

  •  Service provider when the service starts, the service name, IP address, access-side ports and other service metadata information registered with the registry .
  •  Registration centers and service providers can not maintain the heartbeat detectors will be removed from the registry during service.
  •  When the service consumer access to service providers the latest information from the registry, you can use a regular pull and event notifications in two ways.

    CAP theorem :

     In a distributed computer system, can only meet the consistency (Consistency), availability (Availability), and partitions fault tolerance (Partition tolerance), two, this is the CAP theorem.

              Zoning fault tolerance: communication during service even within a certain time can not be kept open it will not affect the system continues to run. Distributed systems, partition fault tolerance is a must.

    For distributed systems: Choice between the AP and the CP;

    The industry to provide the registry for service discovery, both to meet the AP or CP systems in nature.

    High Availability:

      In order to ensure the availability of registration centers to multi-node deployment, but also need the ability to heal and adjust. Registration centers need to have the ability to determine the health of the cluster nodes, the nodes can access timeout removed, restored node rejoin.

    4.1.2 Zookeeper

      A highly available and have strict sequential access control capabilities distributed coordination system, which is a distributed data consistency solutions.

      

    4.1.3 Erueka

  4.2 Load Balancing

    4.2.1 server load balancing

    4.2.2 client load balancing

  4.3 limiting

    4.3.1 limiting algorithm

    4.3.2 limiting implementation

    4.3.3 Dimensions and limiting particle size

  4.4 fuse

    4.4.1 Overview

    4.4.2 Fuse mode

    4.4.3 Hystrix

  

Guess you like

Origin www.cnblogs.com/liufei1983/p/11470081.html