I wanted to confirm is it OK to deploy long running BackgroundService on PCF? Because from what I know PCF is not the best option to deploy long running services, some people I have talked to say to go with other options but we really don't have other Cloud options availablr right now. What could be the issues we might face if we continue to use PCF for long running service, is it like will pcf recycle in the middle of the task performing critical operations?
Thank you.
When building your applications for a cloud native platform like Cloud Foundry, you should generally expect that the application could be taken down, or a backing service could temporarily disappear, or the network could go down, etc.
However, Cloud Foundry itself is unlikely to cycle your application instances for no reason and should be perfectly capable of running your long-running service. It is worth noting that like any other platform it is possible that (for example) the underlying infrastructure may need to be restarted to apply patches to the operating system.
System restarts for updates may be a bit less predictable than more traditional environments where you can cycle individual servers or app instances, but the operations team responsible for Cloud Foundry would have control of when those updates are applied, and if you're building fault tolerance into your app, you shouldn't have any serious problems there.