Re: libpq connectoin redirect
От | feng tian |
---|---|
Тема | Re: libpq connectoin redirect |
Дата | |
Msg-id | BAY144-W6A8957F6B5422B3D522A980080@phx.gbl обсуждение исходный текст |
Ответ на | Re: libpq connectoin redirect (James William Pye <lists@jwp.name>) |
Список | pgsql-hackers |
<pre style="margin: 0em;">Hi, John,<br /><br />The change will be on the libpq client side. I am not saying this is a general<br/>solution for the distributed transaction/scale out. However, in many cases, it<br />is very useful. For example,in my case, I have about 100 departments each has <br />it own database. The balance machine can just redirect tothe right box according<br />to database/user. The 4 boxes I have may not even get domain name or static IP.<br />Anotherscenario, if I have some kind of replication set up, I can send transaction<br />processing to master and analyticreporting query to slaves. <br /><br />Thanks,<br />Feng<br /><br />feng tian wrote:<br /></pre><blockquote style="border-left:0.2em solid rgb(85, 85, 238); margin: 0em; padding-left: 0.85em;"><pre style="margin: 0em;">Hi,<br /><br/></pre><tt>I want to load balance a postgres server on 4 physical machines, say </tt><tt>127.0.0.11-14. I can set upa pgbouncer on 127.0.0.10 and connection </tt><tt>pooling to my four boxes. However, the traffic from/to clients will </tt><tt>gothrough an extra hop. Another way to do this, is to send the </tt><tt>client an "redirect" message. When clientconnect to 127.0.0.10, </tt><tt>instead of accepting the connection, it can reply to client telling it </tt><tt>toreconnect to one of the server on 127.0.0.11-14. </tt><tt> </tt><tt>I am planning to write/submit a patch to dothat. I wonder if there </tt><tt>is similar effort in extending libpq protocol, or, if you have better </tt><tt>ideas onhow to achieve this. </tt></blockquote><tt><br />how do you plan on maintaining consistency, transactional integrity and</tt><tt>atomicity of updates across these 4 machines? </tt><br /><hr />The New Busy is not the too busy. Combine allyour e-mail accounts with Hotmail. <a href="http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4" target="_new">Getbusy.</a>
В списке pgsql-hackers по дате отправления: