This is a discussion on Apache and multiple back-end servers within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi all, I am new to web applications. I have the following question. I have a web server and two ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi all,
I am new to web applications. I have the following question. I have a web server and two servers that run a heavy emmulation program. This is what I want: when a user wants to run the program the apache server will look at which server is free and send through php a series of commands to that particular machine. Currently the system works with just one back-end server. I want to add another one. This shouldnt be difficult but I am not really sure what to look for on the net and the newsgroups. Any hints? Thank you in advance |
|
|||
|
On 27 Feb, 11:23, tolis.junk.ema...@gmail.com wrote:
> Hi all, > > I am new to web applications. I have the following question. I have a > web server and two servers that run a heavy emmulation program. This > is what I want: when a user wants to run the program the apache server > will look at which server is free and send through php a series of > commands to that particular machine. Currently the system works with > just one back-end server. I want to add another one. > > This shouldnt be difficult but I am not really sure what to look for > on the net and the newsgroups. Any hints? > > Thank you in advance do both machines have web servers running on them? if they do I assume its for more than communicating with the front end server, and given that they do couldnt you just have a script on both back end machines that does a top and finds the free CPU/mem, the front end server can then get the 2 outputs and make the decision as to which back end server to send the command string to. This is all given that you do it this way - with 3 servers each running some kind of web server! |
|
|||
|
> do both machines have web servers running on them? if they do I assume
> its for more than communicating with the front end server, and given > that they do couldnt you just have a script on both back end machines > that does a top and finds the free CPU/mem, the front end server can > then get the 2 outputs and make the decision as to which back end > server to send the command string to. > This is all given that you do it this way - with 3 servers each > running some kind of web server! The PCs are running Matlab. The user provides some parameters to the apache and then the apache sends this parameters to matlab. But since it takes time for the the completion of the script (matlab) i want to add multiple PCs and have apache (???) distribute the load to the available PCs |
|
|||
|
On 27 Feb, 13:25, apostolos.georga...@gmail.com wrote:
> > do both machines have web servers running on them? if they do I assume > > its for more than communicating with the front end server, and given > > that they do couldnt you just have a script on both back end machines > > that does a top and finds the free CPU/mem, the front end server can > > then get the 2 outputs and make the decision as to which back end > > server to send the command string to. > > This is all given that you do it this way - with 3 servers each > > running some kind of web server! > > The PCs are running Matlab. The user provides some parameters to the > apache and then the apache sends this parameters to matlab. But since > it takes time for the the completion of the script (matlab) i want to > add multiple PCs and have apache (???) distribute the load to the > available PCs you can do this, I suggest the setup front end "job server" with mysql, or sqlite list of jobs pushed to it by users. Make sure to only push correct jobs! as many other machines as you need all running a process monitor either as a service or as a cron job, when they detect that the local matlab process has finished, they request and execute the next job from the front end server. The cheapest of all cheap ways to do this would be to ensure that the front end server actually returned the job in the file format that could be executed directly, (check that the job is what it should be for security) and use cronw version 2, tasklist in a batch job to check the local process table and wget for windows to retrieve the job to be executed. Of course there are much better ways but this would be doable in short order. I use cronw2 myself on windows, it has a small footprint of 2M and jobs are added via a text file crontab.txt just like unix. It runs as a windows service. It's 100% on my machines. wget is just a real handy commandline http/ftp tool a steal again from unix/linux very handy. |
| Thread Tools | |
| Display Modes | |
|
|