Router Service
Router microservice registers services and routes external traffic (port 8082) to internal microservices (8081, 8040, etc.).
Service Registration
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.
Health Checks
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.
Port Routing
Use the Router's external port (8082) to reach any microservice within the JFrog Platform. For example, a request to artifactory.com:8082/artifactory reaches Artifactory on port 8081 internally, and a request to artifactory.com:8082/access reaches Access on port 8040.
If you see errors from other microservices mentioning
localhost:8082orlocalhost:8046, 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 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
.
.
.Updated 24 days ago
