ARTIFACTORY: Artifactory’s Microservices Explained

AuthorFullName__c
Patrick Russell
articleNumber
000005037
FirstPublishedDate
2021-04-06T17:57:52Z
lastModifiedDate
2022-12-27

ARTIFACTORY: Artifactory’s Microservices Explained

Relevant Version: Artifactory 7.X

Although the JFrog Wiki provides an overview of Artifactory's microservices, it does not go into detail about the purpose and function of these services. This article hopes to describe these services in more detail to assist with troubleshooting them.

In this article, the whole Artifactory 7.X system is referred to as the "Artifactory Platform". The Artifactory Platform contains eight or nine microservices running together. The reason for this terminology is because there is an "Artifactory" microservice in the Artifactory Platform.

The "Context path" referred to throughout the article is used in REST API commands directed at that particular microservice. For example, the context path of Artifactory is "/artifactory", and can be used in a System Ping test:

# Artifactory microservice health check
curl localhost:8082/artifactory/api/system/ping

 

Artifactory 
Context path: /artifactory | Port: 8081

Artifactory is the original JFrog Binary Repository Manager, it was released back in 2016 as Artifactory 1.0. It still runs on a bundled Apache Tomcat host. Tomcat is a Java-based application, in 7.X it uses the Java JDK. Both of these dependencies are bundled together in the Artifactory Platform installer.

Artifactory has evolved in scope over the years, its primary purpose is to be an efficient Binary Repository Manager. In the Artifactory Platform, the Artifactory microservice handles configuration changes, downloads and uploads, and some background tasks such as metadata calculations.

The Artifactory microservice has been evolving to delegate more and more behaviors to other microservices. This is being done to improve the overall stability and efficiency of the Platform.

Access
Context path: /access | Port: 8040

The Access microservice was first introduced in Artifactory 5.4. It runs on the same Apache Tomcat as Artifactory, it is also a Java web application. 

The Access microservice handles security operations of the Artifactory Platform. Actions such as logins, REST API authentication, and security configuration changes are all handled by this service. It also manages microservice registration for the rest of the Platform.

This microservice was designed to improve the performance of logins and authentications. It has its own Tomcat maxThreads and database connection pool.

Router
Context path: /router | External Port 8082 | Internal Port 8046

The JFrog Router microservice, along with the remaining microservices in this article, was introduced in Artifactory 7.0. It forms the core of the Artifactory Platform system, as it manages all communications between microservices:

User-added image

During an Artifactory Platform startup, the Router microservice handles the registration of the other microservices within the Platform. For the startup to succeed, all of the microservices must connect and "join" the cluster successfully. Joining the cluster involves going through the Router to register with the Access microservice.

The Router microservice performs routine health checks to the other microservices. If a health check is missed, the router will mark the service as "Unavailable" and will fail 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 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 will reach Access on port 8040.

If you see any errors from the other microservices mentioning "localhost:8082" or "localhost:8046", these errors mean there is a problem with the Router.

Frontend
Context path: /ui | Internal port: 8070

The Frontend is accessed through the Router on port 8082 using a web browser. Its internal port shouldn't be accessed during day-to-day operations.

The Frontend microservice handles the Unified Web UI of the JFrog Platform. It seamlessly merges the views of systems such as Xray or Mission Control, even though these systems are deployed on separate hosts. 

If another system such as Xray becomes unavailable, its UI elements will be disabled. The Artifactory Platform's URL displayed throughout the Frontend UI is controlled by two separate settings:

  1. The Custom Base URL: Located in the UI under Admin -> General -> Settings, this is the default URL shown in menus and metadata
  2. The "Override Base URL" Header: Used in reverse proxies, the "X-JFrog-Override-Base-Url" header to override both UI and metadata URLs
Metadata 
Context path: /metadata | Internal port: 8086

JFrog Metadata is normally not accessed directly, it runs in the background during regular operations.

The Metadata microservice handles the calculation and indexing of packages within the Artifactory Platform. As of Artifactory Platform 7.X, this duty is shared with the Artifactory microservice, some packages are calculated by Metadata while others are still handled by Artifactory.

The Metadata system displays the information it has calculated in the "Packages" UI view:

User-added image

Event 
Context path: /event | Internal port: 8062

JFrog Event handles sending artifact data to external services such as JFrog Xray or JFrog Distribution. It usually works through both the local Artifactory Platform Router, which connects it to the remote Router of Xray or Distribution.

Events are tasks which require moving artifacts or updating metadata. The Event microservice has taken on this role from the Artifactory microservice. In the past, the Artifactory microservice handled these kinds of operations.
 

JF Connect
Context path: /jfconnect | Internal Ports: 8030, 8035

JF Connect is JFrog's dynamic entitlement service. It was introduced in 7.23 , and has grown in scope and function since then. This system tries to connect to the JFrog Entitlements Server upon startup.
 

Observability
Context path: /observability | Internal Port: 8036

The Observability microservice is designed to watch the rest of the Artifactory Platform microservices and report on their metrics to external monitoring applications. These include DataDog, Splunk, and other monitoring applications.

Details on Observability can be found on our wiki here.
 

Integration
Context path: /integration | Internal Ports: 8072, 8071

This microservice is tied to JFrog Event and Distribution. It tracks integrations with other JFrog products.

 

(Optional) Mission Control
Context path: /mc | Internal Ports: 8080

Mission Control can be optionally enabled as an Artifactory Platform microservice. Mission Control tracks other Artifactory Platforms and has many features and functions. Having it installed in an Artifactory Platform helps simplify server architecture.

Further details on this system can be found here.