Last post Jun 07, 2017 11:59 PM by deepalgorithm
May 31, 2017 01:52 PM|ASPbun|LINK
Hi, I've started working on windows services lately and I'd like to know some answers to my doubts.
I have a windows service which runs everyday and performs a task. We have load balancer application for our production servers. So basically if one goes down, the other takes over full control until the other one comes back up. We make sure both these servers
are in sync all the time. Now I have to set up this windows service, should I configure it on both servers? Will this windows service run on only one server or both servers at scheduled time?
Also, as part of this windows service, a csv file gets processed. This csv file will be uploaded by users from front end application. I have my setup on both servers so files gets uploaded sometimes on server1 and sometimes on server2. Due to this reason,
should I configure my windows service on both servers so a correct file gets processed everytime?
All this is little confusing to me as there is very little information or samples of what I am trying to achieve. Currently, I have the service setup on only one server which is always active(has been so far). Sometimes the service gets stopped automatically
for no reason.. and I have to go back and restart the service. How to overcome this issue?
Thanks for any hep.
May 31, 2017 02:23 PM|deepalgorithm|LINK
Now I have to set up this windows service, should I configure it on both servers?
Yes, but you can also install & configure the Windows service on an application server that can see both of the load balanced web servers.
Will this windows service run on only one server or both servers at scheduled time?
Unless you install and configure it on an application server, it must be on both of the load balanced servers.
Due to this reason, should I configure my windows service on both servers so a correct file gets processed everytime?
How to overcome this issue?
Set the "Startup type" of the windows service to "Automatic".
May 31, 2017 06:01 PM|ASPbun|LINK
Thanks so much for simple and straight forward answers. What is this application server you are suggesting of? Could you please give me some more details or any article that I can refer to.
May 31, 2017 06:18 PM|deepalgorithm|LINK
The application server is just another machine that handles things like this. Web Server & Application Server are terms that are often used interchangeably. My main point is it may be a good idea to centralize the processing of this file.
As an example, I may have an application running on one machine and a Message Queue routing messages on another (application server).
Please mark the answer accepted if it helped you, so others can benefit from it as well. Thanks
Jun 01, 2017 04:23 PM|ASPbun|LINK
Ahh.. I see. Thank you so much for explanation. I think that is a good idea having a centralized place for processing files. Because, I did some testing and found that the file was uploaded on to server1 and another file to server2. When the service got
triggered, only the file on server1 got processed.. the other one never did not. This is not a good approach. Do you think this issue can be solved by the centralized approach?
Thanks once again.
Jun 07, 2017 11:59 PM|deepalgorithm|LINK
Do you think this issue can be solved by the centralized approach?
Yes I do.