How can I create a Codeigniter application that resides on multiple servers and has a hook that sends users to different instances based on load balance?
I would not use PHP for this. Routing users between servers is work for Apache.
Take a look at this http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html
Your domain acts as a proxy for your many web servers. Apache balances requests for each server.
I have never used it, but I think it works.
CI-hook per-say, ngnix apahce2 / . , , Memcached ( ), , , CDN /js.
System , , app1, app2... then on index.php. , , :
$cpu > 80 || $memory > 900 $ application = "app2";
, 1024 RAM. , vars () .
apache http://www.ctrip.ufl.edu/apache2-cluster-in-debian-lenny-howto
Source: https://habr.com/ru/post/1769635/More articles:Android canvas setMatrix (null) crashes (if getMatrix precedes it) - androidGiving table rows solid continuous background color - cssAny value when catching an exception and immediately repeating it? - pythonIs it bad to use Reflection in production code? - reflectionLinq to SQL and Intersect - linq-to-sqlHow to create sound from a double array and play it on the speaker - c ++Как загрузить файл из Интернета в приложении WinForm - c#javascript - remove an element / node without identifier and specific content - javascriptMagento - how to include javascript file page by page - javascriptПрограммно сгенерировать PDF из HTML на iPhone - objective-cAll Articles