0

In our software, we have a windows service that performs all our background processing from sending scheduled SMS to performing backups, (maybe 10 different functions).

I am questioning as to what other people's experiences are in regards to windows services, is it better to have a single service for a single function (eg - backup service to perform backups) or is it simpler to have one large service to do all the functionality you require.

  • Like everything in swdev, there is no "one size fits all" answer. – RubberDuck May 16 '17 at 0:54
  • Thanks RubberDuck, I guess the question was to what experiences people have had. – user1653400 May 16 '17 at 0:55
  • 1
    Those don't make for very good questions. However, if you tell us more about your specific problem, maybe someone could provide a constructive answer. Unfortunately, that's very hard to do as your question is written. – RubberDuck May 16 '17 at 0:57
3

I think it is more common to make smaller services. That gives you more options:

  1. You can deploy different services on different machines if needed.
  2. You can give each service account only the permissions that it needs, e.g. if some of the services need network access and some don't.
  3. If any of the services has a resource leak, you can restart it without impacting other services.

If some of the services seem like they should "go together" in some way, you can set up dependencies between services via RegEdit or by using sc config.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.