Load balancing is a computer networking methodology to distribute workload across multiple computers or a computer cluster, network links, central processing units, disk drives, or other resources, to achieve optimal resource utilization, maximize throughput, minimize response time, and avoid overload. Using multiple components with load balancing, instead of a single component, may increase reliability through redundancy. The load balancing service is usually provided by dedicated software or hardware, such as a multilayer switch or a Domain Name System server.
Failover : In computing, failover is the capability to switch over automatically to a redundant or standby computer server, system, or network upon the failure or abnormal termination of the previously active application,[1] server, system, or network. Failover happens without human intervention and generally without warning, unlike switchover.Systems designers usually provide failover capability in servers, systems or networks requiring continuous availability and a high degree of reliability.
At server-level, failover automation takes place using a "heartbeat" cable that connects two servers. As long as a regular "pulse" or "heartbeat" continues between the main server and the second server, the second server will not initiate its systems. There may also be a third "spare parts" server that has running spare components for "hot" switching to prevent down time.
The second server will immediately take over the work of the first as soon as it detects an alteration in the "heartbeat" of the first machine. Some systems have the ability to page or send a message to a pre-assigned technician or center.Some systems, intentionally, do not failover entirely automatically, but require human intervention. This "automated with manual approval" configuration runs automatically once a human has approved the failover.
Relationship to failover :
Load balancing is often used to implement failover — the continuation of a service after the failure of one or more of its components. The components are monitored continually (e.g., web servers may be monitored by fetching known pages), and when one becomes non-responsive, the load balancer is informed and no longer sends traffic to it. And when a component comes back on line, the load balancer begins to route traffic to it again. For this to work, there must be at least one component in excess of the service's capacity. This is much less expensive and more flexible than failover approaches where a single live component is paired with a single backup component that takes over in the event of a failure. Some types of RAID systems can also utilize hot spare for a similar effect.
MySql replication : MySQL supports two kinds of replication: statement-based replication and row-based replication. Statement-based (or“logical”) replication has been available since MySQL 3.23, and it’s what most people are using in production today. Row-based replication is new in MySQL5.1.Both kinds work by recording changes in the master’s binary log and replaying the log on the slave, and both are asynchronous--- that is, the slave’s copy of the data isn’t guaranteed to be up-to-date at any given instant. There are no guarantees of how large the latency on the slave might be. Large queries can make the slave fall seconds, minutes, or even hours behind the master.
We prefer slaves to be read-only, so unintended changes don’t break replication. We can achieve this with the read_only configuration variable.
How Fast Is Replication?
To mitigate the data inconsistency due to the delay of the replication, we are exploring following options:
A common question about replication is “How fast is it?” The short answer is that it’s generally very fast, and it runs as quickly as MySQL can copy the events from the master and replay them. If we have as slow network or very large binary log events, the delay between binary logging and execution on the slave might be perceptible. If the SQL queries take a long time to run and we have a fast network, we can generally expect the query time on the slave to contribute more to the time it takes to replicate an event.
Refer : http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-configuration-properties.htmlFailover : In computing, failover is the capability to switch over automatically to a redundant or standby computer server, system, or network upon the failure or abnormal termination of the previously active application,[1] server, system, or network. Failover happens without human intervention and generally without warning, unlike switchover.Systems designers usually provide failover capability in servers, systems or networks requiring continuous availability and a high degree of reliability.
At server-level, failover automation takes place using a "heartbeat" cable that connects two servers. As long as a regular "pulse" or "heartbeat" continues between the main server and the second server, the second server will not initiate its systems. There may also be a third "spare parts" server that has running spare components for "hot" switching to prevent down time.
The second server will immediately take over the work of the first as soon as it detects an alteration in the "heartbeat" of the first machine. Some systems have the ability to page or send a message to a pre-assigned technician or center.Some systems, intentionally, do not failover entirely automatically, but require human intervention. This "automated with manual approval" configuration runs automatically once a human has approved the failover.
Relationship to failover :
Load balancing is often used to implement failover — the continuation of a service after the failure of one or more of its components. The components are monitored continually (e.g., web servers may be monitored by fetching known pages), and when one becomes non-responsive, the load balancer is informed and no longer sends traffic to it. And when a component comes back on line, the load balancer begins to route traffic to it again. For this to work, there must be at least one component in excess of the service's capacity. This is much less expensive and more flexible than failover approaches where a single live component is paired with a single backup component that takes over in the event of a failure. Some types of RAID systems can also utilize hot spare for a similar effect.
MySql replication : MySQL supports two kinds of replication: statement-based replication and row-based replication. Statement-based (or“logical”) replication has been available since MySQL 3.23, and it’s what most people are using in production today. Row-based replication is new in MySQL5.1.Both kinds work by recording changes in the master’s binary log and replaying the log on the slave, and both are asynchronous--- that is, the slave’s copy of the data isn’t guaranteed to be up-to-date at any given instant. There are no guarantees of how large the latency on the slave might be. Large queries can make the slave fall seconds, minutes, or even hours behind the master.
We prefer slaves to be read-only, so unintended changes don’t break replication. We can achieve this with the read_only configuration variable.
How Fast Is Replication?
To mitigate the data inconsistency due to the delay of the replication, we are exploring following options:
A common question about replication is “How fast is it?” The short answer is that it’s generally very fast, and it runs as quickly as MySQL can copy the events from the master and replay them. If we have as slow network or very large binary log events, the delay between binary logging and execution on the slave might be perceptible. If the SQL queries take a long time to run and we have a fast network, we can generally expect the query time on the slave to contribute more to the time it takes to replicate an event.
- Use Memcache that holds the last modified timestamps for the Content modified.
- Query-based split :The simplest split is to direct all writes and any reads that can never tolerate stale data to the active or master server. All other reads go to the slave or passive server.
jdbc:mysql://[host][,failoverhost...][:port]/[database] »
[?propertyName1][=propertyValue1][&propertyName2][=propertyValue2]...
No comments:
Post a Comment