Community Page
- blog.jploh.com/ Jump to website »
-
Subscribe -
Community
-
Top Commenters
-
Popular Threads
-
Recent Comments
- I second that Sebastian, unless you want it to remain close and opt for the unnecessary headache.
- Thanks for posting the code. It's really helpful although this was posted 2 years ago.
- Nag file ako ng case sa asawa coz nangiredo sya. At this time may lawyer sya Atty. winslow teodesio & Atty. cangreja. My lawyer is Atty. Panes & Atty. Penetrante. i got no evidence to show...
- Magandang hapon po Sir/Mam,bali po kapatid po ako ng magrereklamo at dumudulog sa inyo. Si Mrs. Irene Pamintuan po (ate ko) ngayon ay nagbabarko,nakiusap lang po sya sken na mag-email sa inyo. Kami...
- Interesting post. I have made a twitter post about this. Others no doubt will like it like I did.
Jump to original thread »
My “research” on clustering and replication was just timely. I had to find a fix for an overloaded server. I could’ve just rewritten the code but I wanted to try something new first. I found out that a MySQL cluster needs to have at least three servers to get full redundancy. Replication was my only […]
... Continue reading »
2 years ago
I'm thinking of implementing cluster over two servers - could you tell me about the issues you found that make it require three machines ?
Thanks
Andy
2 years ago
2 years ago
It seems to me that your approach should work out just fine. Just don't try to get into master-master replication... it's a pain and it can only lead to tears. :)
If you want to make it more robust, you could add a couple of features to your daemon. For example, you should pull your config information from a file. Then you could implement a simple protocol. For example, the client could send "REQ" to request a DB handle. Or the client to send "RELOAD" to cause the daemon to reload it's config file. This way you wouldn't have to stop the daemon...
Then again, PHP probably isn't the best language to use for the daemon, since it will block on each request. If you have two requests coming in at the same time, the second one will have to wait for the first to get done. This might be an issue over time.
2 years ago
2 years ago
I also extended my daemon script that's running in production. I just wanted to give a basic idea of how it works.
For performance, refer to the image below. The one in blue was when it wasn't rotating between servers. The one in red, when rotation was in effect.
<img src="http://img458.imageshack.us/img458/4946/jppniccmysqlqueriesweekyi4.png" alt="QPS before/after"></img>
1 year ago
this link is not working.can you provide me any other link which has more information about algorithm.
1 year ago
http://rapidshare.com/files/88019396/03-11.pdf....
1 year ago
1 year ago
11 months ago
2 months ago
$stream = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
Put that above the socket_bind...
2 weeks ago