Open ezwang opened 7 years ago
Since NFS is being used to serve /web
, the file system across Director instances should be synchronized. The only issue is the Nginx/Supervisor/PHP-FPM configurations, which will have to be created and run on the Director instance that is serving the site.
One method to implementing this could be to use a decorator to identify methods that need to be run on a particular host, and then have the decorator redirect the action to the appropriate host if the current host is not the correct one.
Make the interface separate from the server, and change it so that there can be multiple servers.
There could be one server that serves the Director user interface. There could be a collection of servers that serve websites, and are Nginx reverse proxied through the main server. Redis could be used for communication between the user interface and the web servers, and each server could have an agent that is responsible for restarting Nginx / supervisor / PHP-FPM. The servers could have a shared filesystem through NFS.
The option for multiple PostgreSQL or MySQL servers could be added if the need arises. The conductor agent could also be modified to communicate with multiple VM servers.