|
1 |
| -<!-- $PostgreSQL: pgsql/doc/src/sgml/failover.sgml,v 1.5 2006/11/14 22:25:15 momjian Exp $ --> |
| 1 | +<!-- $PostgreSQL: pgsql/doc/src/sgml/failover.sgml,v 1.6 2006/11/15 01:09:08 momjian Exp $ --> |
2 | 2 |
|
3 | 3 | <chapter id="failover">
|
4 | 4 | <title>Failover, Replication, Load Balancing, and Clustering Options</title>
|
|
149 | 149 | <title>Query Broadcast Load Balancing</title>
|
150 | 150 |
|
151 | 151 | <para>
|
152 |
| - Query broadcast load balancing is accomplished by having a program |
153 |
| - intercept every query and send it to all servers. Read-only queries can |
154 |
| - be sent to a single server because there is no need for all servers to |
155 |
| - process it. This is unusual because most replication solutions have |
156 |
| - each write server propagate its changes to the other servers. With |
157 |
| - query broadcasting, each server operates independently. |
| 152 | + Query broadcast load balancing is accomplished by having a |
| 153 | + program intercept every SQL query and send it to all servers. |
| 154 | + This is unique because most replication solutions have the write |
| 155 | + server propagate its changes to the other servers. With query |
| 156 | + broadcasting, each server operates independently. Read-only |
| 157 | + queries can be sent to a single server because there is no need |
| 158 | + for all servers to process it. |
158 | 159 | </para>
|
159 | 160 |
|
160 | 161 | <para>
|
161 |
| - Because each server operates independently, functions like |
| 162 | + One limitation of this solution is that functions like |
162 | 163 | <function>random()</>, <function>CURRENT_TIMESTAMP</>, and
|
163 |
| - sequences can have different values on different servers. If |
164 |
| - this is unacceptable, applications must query such values from |
165 |
| - a single server and then use those values in write queries. |
166 |
| - Also, care must also be taken that all transactions either commit |
167 |
| - or abort on all servers Pgpool is an example of this type of |
168 |
| - replication. |
| 164 | + sequences can have different values on different servers. This |
| 165 | + is because each server operates independently, and because SQL |
| 166 | + queries are broadcast (and not actual modified rows). If this |
| 167 | + is unacceptable, applications must query such values from a |
| 168 | + single server and then use those values in write queries. Also, |
| 169 | + care must be taken that all transactions either commit or abort |
| 170 | + on all servers Pgpool is an example of this type of replication. |
169 | 171 | </para>
|
170 | 172 | </sect1>
|
171 | 173 |
|
172 | 174 | <sect1 id="clustering-for-load-balancing">
|
173 | 175 | <title>Clustering For Load Balancing</title>
|
174 | 176 |
|
175 | 177 | <para>
|
176 |
| - In clustering, each server can accept write requests, and these |
177 |
| - write requests are broadcast from the original server to all |
178 |
| - other servers before each transaction commits. Heavy write |
179 |
| - activity can cause excessive locking, leading to poor performance. |
180 |
| - In fact, write performance is often worse than that of a single |
| 178 | + In clustering, each server can accept write requests, and modified |
| 179 | + data is transmitted from the original server to every other |
| 180 | + server before each transaction commits. Heavy write activity |
| 181 | + can cause excessive locking, leading to poor performance. In |
| 182 | + fact, write performance is often worse than that of a single |
181 | 183 | server. Read requests can be sent to any server. Clustering
|
182 | 184 | is best for mostly read workloads, though its big advantage is
|
183 |
| - that any server can accept write requests --- there is no need |
| 185 | + that any server can accept write requests — there is no need |
184 | 186 | to partition workloads between read/write and read-only servers.
|
185 | 187 | </para>
|
186 | 188 |
|
|
0 commit comments