Some relevant knowledge about Clusters
Tianyu 2002-12-16
I have noted notes when I prepare Scea Part 1 for some time.
Study notes directory and download à
http://www.arkee.org/forum/showthread.jsp?forumid=7&rootid=2533&roNOUNCEID = 2533
Summary
Server clusters grow system availability (Redundance). It also provides fault tolerance. Use clusters to distribute requests so that multiple servers can share loads. Some servers may also provide which server utilization Not sufficient to balance the complex treatment of the load.
Server affinity or sticky load balancing
From the same client to the same backend machine, routing request. If you use Stateful Session or Entity EJBS, it will make the only valid server to transfer the request.
Load Distribution
Load distribution and server affinity have recognized that multiple servers can accept request targets. But it also recognizes that some requests are best locating specific servers directly.
Weak affinity (Weak affinity)
Try to force affinity. But not always guaranteed.
Strong affinity
Guarantee attention to affinity
Load balancing vs. loading sharing
The load distribution is usually done with load sharing between the two servers. However, the shared load is inappropriate because the same click is always allocated to each server, and neglects changes in capacity and current load. The server starts to handle too much or too little load sharing, causing your site inconsistent response.
On the other hand, balanced load pays attention to the capacity and load of the web server. Therefore, all servers will get appropriate loads, return, and consistent responses each time.
Load balancing is more difficult to do so hard to work harder to work on all processors.
Load sharing
PROS ::
Set simple
Cheap
CONS:
1. If a server Down is lost, the client will continue to be positioned to this machine, using DNS, more heavy this problem, because the client caching DNS facts and DNS changes through the public DNS server spend time propagation.
2. Load sharing is not required to distribute loads.
For example, Server 1 is overloaded, Server 2 is idle
3. The web server redirection is only suitable for HTTP.
DNS ROBIN
Equality between many DNSs. This means that each subsequent package is sent to the next IP address in the list until the last package is reached, and then the next package is sent to the first one. Address. This is a simple load balancing policy (in fact, Load Distribution, Load-Share). It does not pay attention to the actual load on the machine..
The DNS Round Robin load distribution regardless of the requested type (which is SSL, JSP, HTML) uniform separation request. If you have three servers, the first request enters the first server, the second request to the second Server, the third request to the third server. When the fourth request enters, restart this process, so this request is coming to the first server.
DNS Round Robin supports pools of some application services, not just a web server. You can use DNS to be load-share using DNS as web pools, email, ftp, database, and other servers.
Disadvantages: If a machine is dead, some transmission route will still be on a dead machine.
DNS RR does not care about the CPU utilization, which is considered for a load shared solution.
DNS MX RECORDS
MX allows multiple mail hosts to be set
Web Server Redirect
Redirect from WWW to WWW1 / WWW2 settings using JSP / Servlets / JavaScript
Load Partitioning
Based on the client's state, send their request to the specific server.
For example, if (usernum <10,000) goes to Server1.
Yahoo / Hotmail uses this technology for webmail. US.F206.mail.yahoo.comcons: Distributed load, user locks to one server
Load balance
The distribution process and communication behavior are uniform through computer networks. When a single device fails, it can be unaffected. Load balancing is especially important for networks that are difficult to predict the number of requests to the server. Typical website is on load Use two or more web servers in the equalization scheme. If a server is difficult to deal with, the request is forwarded to a more large-capacity server, and the load balancing can also apply its own communication channel.
Inverse proxy load balancing
The process of requesting separately by requesting the request is separately processed according to the type of request (that is, SSL, JSP, HTML).
Usually when your servers have different quantities of CPUS and memory. You may use some powerful servers to handle SSL Sessions, other processing static HTML. This will maximize your application's performance.
Hardware load balancer
The hardware load balancer provides failure transfer of the request level. When the load balancer detects a specific node Down drop, it will reposition the request to this dead node to other active nodes in the cluster later.
To achieve the obvious session failover, the nodes in the cluster must collaborate with each other, and all Session data can be stored, such as sharing memory areas or a public database. So if a node in the cluster With a problem, Session will continue on another node.
Fault
Fault tolerance is the ability to prevent failure even when some system components are faulty. The key to complete fault is redundant. Redundancy needs to be copied.
By replica use, server clusters increase system reliability and availability. They provide a fault-tolerant mechanism to load distribution and load balancing.
Hot Backup
In hot backup, copy (replica) of objects (replica) for the client request service, continuous and original object. If the original object fails, a copy is immediately taken.
Cold Backups
In the cold backup, the replica is not frequently updated. As the original service synchronizes the status intervals. If the original service fails, a copy must be synchronized before it can ask for the request service. Data from the storage device). That is, the original object is synchronized with a time interval and a stable memory. In case failure, instantiate a new object, read the memory for settings.
Warm Backups
In warm backup (WARM Backups), only original service response requests. However, all activities continue to be logged. The replica is also cyclically cleaning, and new status is obtained from these logs. When the original service fails, a replica Take over immediately after its status and log.
When the backup copy of an object is running, you cannot serve the client. Synchronize in a fixed time interval. In case, a copy is taken over from the latest synchronization point.
Error handling includes service replication, error detection, error recovery, error notification. Error detection usually uses HeartBeats (Server Periodic Send Signal to Monitor) or polling (Monitor Check Server once)
CORBA's fault tolerance involves Replica Managers and Replica Service Agents. (Omitted)
Active Replication and Passive Replication
Active copy is a fault-tolerant mechanism that is considered to be the main service here, trying to serve each request. All replica status is continuously synchronized. Use an interceptor to hinder additional responses, Positive replication concepts and hot spares are similar. Means that each replica handles requests and answers. Interceptors hinder additional to third object calls and additional responses.
In negative replication, the original service processes all requests. Synchronization of the status of the replica, if the original service fails, a replica is synchronized after its state (for example, using the log file), one original replica processing Requests and synchronization second replica status. Request is also recorded in the log, for failure transfer, the second replica becomes the original primary, first, in the latest synchronization point to process all requests. Concept, negative replication and warm backups are similar.