[contestms] Re: Running CMS on Multiple Servers

  • From: William Di Luigi <williamdiluigi@xxxxxxxxx>
  • To: contestms@xxxxxxxxxxxxx
  • Date: Fri, 26 Feb 2016 19:15:54 +0000

As for the "verifying that the load gets shared" part, you can do so by
looking at the logs for each Worker, and noticing that they are indeed
sharing evaluation jobs.

The logs for each worker are located in
/var/local/log/cms/Worker-<number>/last.log, so for Worker-3 you will have
to look inside /var/local/log/cms/Worker-3/last.log

If you will use nginx as a load balancer for multiple ContestWebServers,
then I think you can verify the sharing of load by looking at nginx logs,
but I'm not sure what you should look for. However, maybe it's good to take
a look at this: https://www.nginx.com/resources/admin-guide/load-balancer/

On Fri, Feb 26, 2016 at 8:08 PM William Di Luigi <williamdiluigi@xxxxxxxxx>
wrote:

I'm not sure I understand what you wrote in the "database" line in all the
cms.conf files.

To recap, you should:

1) Write the IP address of the m1 machine (which runs postgres) in ALL
cms.conf files, not just the cms.conf file of the m2 machine. So, every
cms.conf files will be identical in the end (unless for some reason you
want to specify 127.0.0.1 in m1's cms.conf, but there's no reason to do
that, you can just use the IP that every other machine will refer to).

2) [very important] Ensure that you follow this guide:
http://cms.readthedocs.org/en/latest/Running%20CMS.html#configuring-the-db.
Especially the "If you are going to use CMS services on different hosts"
part of it.

3) Be aware that, if you have many users, you should replicate
ContestWebServer as well (by using nginx:
https://github.com/cms-dev/cms/blob/master/config/nginx.conf.sample#L44).

Hope this helps. If you have other doubts, ask :)


On Fri, Feb 26, 2016 at 7:40 PM pravein gk <praveingk@xxxxxxxxx> wrote:

Hi,

I wanted to setup CMS on six machines(m1-m6) in the following way :

1) m1 has to be the main cms server.

2) load is shared b/w m2-m6(workers)

in cms.conf of m2, I change only the database string to :
"database": "postgresql+psycopg2://cmsuser:cmsuser@m1/database.
Rest of the cms.conf is same in all the machines.

And I start m1-m6, and all machines are able to access database from m1
and starting up the ResourceService.

However, I will need to verify the sharing of load b/w the servers.

Can you please let me know how to verify that part?, and also if there is
anything else to be changed in cms.conf to ensure this scenario.?

Thanks,
Pravein.


Other related posts: