JFrog Router is a microservice that handles the registration of the other microservices within the JFrog Platform. For the platform startup to succeed, all the microservices must connect and join the cluster successfully. Joining the cluster involves going through the JFrog Router to register with the Access microservice.
The Router microservice performs routine health checks on the other microservices. If a health check is missed, the router marks the service as Unavailable and fails requests to that service with a 502
HTTP error.
You can use the Router's external port (8082) to reach all of the other microservices within the JFrpg Platform. For example, a request to artifactory.com:8082/artifactory
will reach Artifactory on port 8081 internally, and a request to artifactory.com:8082/access
reaches Access on port 8040.
If you see any errors from the other microservices mentioning localhost:8082
or localhost:8046
, it means that there is a problem with the Router microservice.
Availability Zone Affinity
You can configure a preferred availability zone in the router section of the Artifactory System YAML file. If a service is available in the local zone, traffic is sent to this local service. However, if a service is not available locally, traffic is sent to a service in another zone using a round robin strategy.
The following example code snippet shows the changes in the Artifactory System YAML file to configure the availability zone.
. . . shared: node: availabilityZoneId: az-1 # availability zones are enabled if you enter a value router: availabilityZoneOptimization: loggingIntervalSecs: 600 # the interval to log availability zone configuration even with no changes . . .