You can configure the Publishing Service 2.0 and later releases for high availability where multiple instances of the Publishing Service can be running and accessed via a load balancer. This setup allows service resiliency and prevents the Publishing Service from being a single point of failure.
There is no custom configuration needed to enable the high availability setup. As long as multiple instances of the Publishing Service are configured to connect to the same databases (that is, they have identical connection strings), the Publishing Service automatically elects one of the instances to be active.
In this scenario, only the active instance will have the publishing scheduler enabled to process publish jobs. However, all the inactive instances will still be able to enqueue publish jobs, which will be picked up by the active instance.
If the active instance of the Publishing Service becomes unavailable, the rest of the instances will elect a new active instance to pick up the enqueued publishing jobs.
By default, each instance is assigned a name in the form of a GUID value at startup, which can be seen along with the status in the log:
[Information] Instance Enabled: True ("6e54cbe4-bc60-4d36-86c1-787c5b8dce9d")
You can override the instance name using one of the following methods:
<Settings> <Sitecore> <Publishing> <InstanceName>Instance_name_here</InstanceName> </Publishing> </Sitecore> </Settings>