On Tuesday, 26 June 2012 at 15:02:14 UTC, mta`chrono wrote:
Am 25.06.2012 22:25, schrieb nazriel:
If you want to know more details, let me know


Oh cool. That's great!

textarea -> JSON -> AJAX -> PHP Script -> ....... -> Load Balancer ->
Chroot jail -> D Compiler.


How do you perform interation between php and you load balancer?

Actually it is:
textarea -> Ajax -> PHP Script -> JSON -> http://dpaste.dzfl.pl -> Load Balancer -> Target Jail -> JSON back to http://dpaste.dzfl.pl -> JSON -> PHP Script -> Your output window :D

Load balancer has list of available mirrors, it randomizes this list and in foreach loop tries to connect to host, if it success it just returns, otherwise it continues until it success. When Chroot Jail, has too many connections OR resources for Compiler infrastructure are out, its just cut outs socket connection, so balancer goes forwards and connects to another one.

Here you can see it in action:
http://dpaste.dzfl.pl/66612383

Copy example, create new paste and click couple of times "Compile". I have Linux and FreeBSD mirrors so its showes how requests are forwarded

Reply via email to