Spring Cloud Eureka cluster Dynamic expansion new node

Source: Internet
Author: User

Scenario Description:

Eureka cluster node has two, mutual registration form a cluster, has supported dynamic refresh (do not know how to let Eureka support dynamic refresh can refer to http://www.cnblogs.com/flying607/p/8459397.html), is already running , use Nginx to do load balancing, proxy the cluster, the service's registry address directly write Nginx address.

Now you want to add a Eureka node to this cluster without restarting any services.

The steps to extend the new node are as follows:

0, the new node configuration complete cluster address and start
1, modify the application.yml of each eureka (the configuration file is placed outside the jar package, so it can be easily modified), add new nodes
2. Refresh each Eureka configuration
3, waiting for about 10 minutes (this configuration does not know where to find, I waited for about 10 minutes to see the new node has a movement), refresh the new node, see the Service information synchronization past
4. Modify the Load balancer address of Nginx, add the new node address
5, Nginx-s Reload

Version used:DALSTON.SR1

Off Topic:

The cluster scheme described in this paper has some drawbacks, if a node in the cluster hangs up, there is no perfect fuse and retry measures protection.

If this is a high requirement, consider using lvs+keepalived (listen for a port and remove it in time)

Replace Nginx's agent.

You guys, if there's any good idea, please leave a comment in the comments section.

Spring Cloud Eureka cluster Dynamic expansion new node

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.