Ice cluster-Server Load balancer and fault tolerance

Source: Internet
Author: User

Zero ice we have mastered its basic operating principles. Next we will mainly introduce the problem of multi-port bonding of ice.
Ice uses TCP/IP and UDP protocols, as well as SSL protocols based on TCP/IP. The SSL protocol can fully protect the encryption security of server/client data transmission.
Here, how does the server listen to multiple ports on the same host.

The selection of TCP/IP, UDP, and SSL protocols depends on application requirements. Generally, the TCP/IP protocol's ice application is sufficient.

On the same host, the ice Service supports multi-port monitoring.

Server Registration: TCP-H host-P port1: TCP-H host-P port2 format,

For example:

IP Address: 172.17.12.101, which must be monitored at the same time as 10001 and 10000.

You can write it as follows:

TCP-H 172.17.12.101-P 10000: TCP-H 172.17.12.101-P 10001

Hehe is not very simple. After running, the service listens to ports 10000 and 10001. Note: avoid conflicts between other applications.

Client connection can be in the following three forms:

1. TCP-H 172.17.12.101-P 10000
2. TCP-H 172.17.12.101-P 10001
3. TCP-H 172.17.12.101-P 10000: TCP-H 172.17.12.101-P 100001

Is it nice.

Whether the server listens on multiple ports or only one server is working,

When there are many client applications or high load requirements, we canProgramRun on multiple hosts. Effectively and effectively resolves the pressure from the client by means of clusters.

For example:

Servera172.17.12.101tcp-H 172.17.12.101-P 10000
Serverb172.17.12.102tcp-H 172.17.12.102-P 10000
Serverc172.17.12.103tcp-H 172.17.12.103-P 10000

The client can be connected as follows:
TCP-H 172.17.12.101-P 10000: TCP-H 172.17.12.102-P 10000: TCP-H 172.17.12.103-P 10000

Or
TCP-H 172.17.12.101-P 10000: TCP-H 172.17.12.102-P 10000

According to the specific requirements of the application, you can reasonably and effectively construct the string to connect to the host.

Is this connection method cool.

In fact, this connection method can effectively use the load balancing function provided by ice to reasonably allocate each request of the client to each server. This effectively avoids the huge pressure on the same server caused by a large number of client requests.

Ice's load balancing mainly uses round-robinAlgorithm, Round-robin is a very effective load balancing algorithm.

You may ask, if a server goes down, will the client still work normally?

This is a good question. In fact, ice itself provides an extremely powerful Fault-Tolerant technical function.
Specifically, if a server (assuming servera) goes down and requests from the client are distributed to the servera server, the client automatically records the servera failure status, the requests will be distributed to the server (serverb, serverc) that can work normally. Each request can be distributed to a normal service host (unless a, B, c ). after servera returns to normal, the client automatically perceives the working status of servera. client requests can be effectively allocated to hosts A, B, and C. all this is transparent to developers.

The cluster and fault tolerance functions provided by ICE are extremely powerful.

Client status changes and updates do not need to be restarted.

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.