RTFS Database Requirements
Provision a dedicated PostgreSQL database for RTFS with sizing and partitioning guidance.
The Repository Federation Service (RTFS) requires a dedicated PostgreSQL database for storing event queues, member state, binary tasks, file lists, and configuration data.
Enable RTFS with a Dedicated PostgreSQL Database on Artifactory Platform Chart 7.146.7 and Later
RTFS stores federation control-plane data (events, members, binary tasks, and related state) in PostgreSQL. RTFS does not use Oracle, MySQL, or Microsoft SQL Server for its datastore.
Note
Starting with Artifactory 7.146.7, you can run RTFS against a dedicated PostgreSQL instance while Artifactory continues to use its existing database, for example Oracle. You don't need to migrate your Artifactory installation to PostgreSQL to adopt RTFS.
If Artifactory already runs on PostgreSQL, you may use the same database instance for RTFS or provision a separate one.
Why Use a Separate PostgreSQL for RTFS?
Before Artifactory 7.146.7, RTFS could only connect to the same database engine as Artifactory. Teams on Oracle, MySQL, or Microsoft SQL Server couldn't enable RTFS without changing the Artifactory database platform.
From 7.146.7 onward, configure rtfs.database in the Artifactory Helm chart's values.yaml or in system.yaml so RTFS uses its own PostgreSQL while Artifactory keeps your current database configuration.
Architecture
On a single JPD, Artifactory and RTFS use independent database connections:
┌──────────────────────────────────────────────┐
│ JFrog Platform Deployment (JPD) │
│ │
│ Artifactory ◄──► Artifactory database │
│ │ (Oracle, MySQL, MSSQL, │
│ │ or PostgreSQL) │
│ ▼ │
│ RTFS ◄──► Dedicated PostgreSQL │
│ (RTFS schema only) │
└──────────────────────────────────────────────┘
Federation still synchronizes artifacts and metadata between JPDs as usual. Peer JPDs don't need the same Artifactory database engine. They only need reachable Artifactory endpoints and established trust.
Prerequisites
The following table lists the prerequisites for enabling RTFS with a dedicated PostgreSQL database.
| Requirement | Details |
|---|---|
| Artifactory | Version 7.146.7 or later. Introduces dedicated RTFS database configuration. |
| Artifactory Helm chart | Chart version 107.146.7 or later when deploying with Helm. |
| RTFS PostgreSQL | PostgreSQL 13 or later, with an empty database dedicated to RTFS. RTFS runs Flyway on first start and creates its own schema. |
Provision the RTFS PostgreSQL Database
To provision the RTFS PostgreSQL database:
-
Create an empty database and owner for RTFS:
CREATE USER rtfs WITH PASSWORD '<RTFS_DB_PASSWORD>'; CREATE DATABASE rtfs OWNER rtfs; GRANT ALL PRIVILEGES ON DATABASE rtfs TO rtfs;Where:
<RTFS_DB_PASSWORD>: The password to assign to the newrtfsdatabase user
For example:
CREATE USER rtfs WITH PASSWORD 'S3cureP@ssw0rd!'; CREATE DATABASE rtfs OWNER rtfs; GRANT ALL PRIVILEGES ON DATABASE rtfs TO rtfs;
Warning
Use a managed or highly available PostgreSQL deployment with backups for RTFS. RTFS is part of your federation control plane. Treat its database with the same operational rigor as other platform data stores.
Enable RTFS on Helm with a Non-PostgreSQL Artifactory Database
The following example shows Artifactory on Oracle with RTFS on a separate PostgreSQL instance. The Artifactory database block is unchanged when you enable RTFS. Only the rtfs section is added or updated.
Artifactory on Oracle:
postgresql:
enabled: false
database:
allowNonPostgresql: true
type: oracle
driver: oracle.jdbc.OracleDriver
url: "jdbc:oracle:thin:@<ORACLE_HOST>:1521/FREEPDB1"
user: "artifactory"
password: "<ARTIFACTORY_DB_PASSWORD>"The Oracle JDBC driver isn't bundled with Artifactory. Ship ojdbc11.jar in a custom image or mount it into Tomcat's lib directory rather than downloading it on every pod start.
Enable RTFS with dedicated PostgreSQL:
rtfs:
enabled: true
database:
type: postgresql
driver: org.postgresql.Driver
url: "jdbc:postgresql://<POSTGRES_HOST>:5432/rtfs"
user: "rtfs"
password: "<RTFS_DB_PASSWORD>"Warning
Do not store database passwords in plain text in chart values. Reference existing Kubernetes Secrets:
rtfs: enabled: true database: secrets: url: name: my-rtfs-db-secret key: db-url user: name: my-rtfs-db-secret key: db-user password: name: my-rtfs-db-secret key: db-password
Run helm upgrade with your values file, then confirm RTFS health as described in Verify RTFS Is Running.
Enable RTFS in system.yaml for Non-Helm Installations
For RPM/Debian, archive/tarball, Docker Compose, or VM deployments, edit $JFROG_HOME/artifactory/var/etc/system.yaml.
Example for Oracle-backed Artifactory with RTFS on dedicated PostgreSQL:
shared:
database:
allowNonPostgresql: true
type: oracle
driver: oracle.jdbc.OracleDriver
url: "jdbc:oracle:thin:@<ORACLE_HOST>:1521/FREEPDB1"
username: "artifactory"
password: "<ARTIFACTORY_DB_PASSWORD>"
rtfs:
enabled: true
database:
type: postgresql
driver: org.postgresql.Driver
url: "jdbc:postgresql://<POSTGRES_HOST>:5432/rtfs"
username: "<RTFS_DB_USER>"
password: "<RTFS_DB_PASSWORD>"Note
Helm chart values use
userunderrtfs.database. Insystem.yaml, useusernamefor the RTFS database user.
Your existing shared.database configuration doesn't change. You only add the rtfs block. Restart Artifactory so the platform picks up the change and starts RTFS.
Verify RTFS Is Running
Check the RTFS liveness endpoint (Artifactory 7.117.5+ or 7.111.12+):
curl -s -o /dev/null -w "%{http_code}\n" \
https://<JFROG_PLATFORM_URL>/rtfs/api/v1/system/livenessA response of 200 indicates RTFS is up and connected to PostgreSQL.
On Kubernetes, RTFS pod logs should show JDBC connectivity and Flyway migrations on first start:
kubectl -n <NAMESPACE> logs <RTFS_POD> | grep -iE "postgres|jdbc:postgres|flyway"Existing trust and federation configurations continue to work when you enable RTFS on an already federated environment. If you run legacy in-Artifactory federation today, enable RTFS first, then migrate configuration and state. For more information, see Migrate to the Artifactory Federation Service.
After RTFS is healthy, configure federated repositories and trust between JPDs as described in Setup Prerequisites for Federated Repositories and Create a Federated Repository or Create Your First Federation.
Production Considerations for RTFS Database
- Use
rtfs.database.secrets(andexistingSecretfor Artifactory credentials) instead of inline passwords. - Run managed or HA PostgreSQL for RTFS with backup and recovery procedures.
- Set appropriate resource requests, limits, HPA, and PodDisruptionBudgets per the Helm chart documentation.
- Establish JPD trust through the Platform UI or supported automation rather than ad-hoc API calls where possible.
Database Requirements
RTFS has the following database requirements.
| Requirement | Value |
|---|---|
| Database engine | PostgreSQL |
| JDBC driver | org.postgresql.Driver |
| Helm configuration | Set database.type, database.driver, database.url, database.username, and database.password in values.yaml. |
RTFS doesn't support MySQL, MariaDB, Oracle, or other databases. PostgreSQL is required for both SaaS and self-managed deployments.
Key Tables and Data Types
RTFS stores the following categories of data in its database.
| Data Category | Purpose | Growth Pattern |
|---|---|---|
| Event queue | Persistent storage for artifact and repository events waiting to be propagated. | Grows with event volume. Cleaned by EventsCleanupJob after rtfs.events.cleanup.retention.time.Days (default: 3 days). |
| Message blobs | Serialized event payloads for batch propagation. | Grows with event volume. Partitioned automatically. |
| Member state | Current state, heartbeat timestamps, and configuration for each Federation member. | Stable size. One record per member per repository. |
| Binary tasks | Tracking records for asynchronous binary transfers between members. | Grows with binary transfer volume. Completed tasks are cleaned up. |
| File list tasks | Tracking records for Full Sync file list preparation and processing. | Transient. Entries are removed after Full Sync completes. |
| Stream metadata | Worker stream positions and lag tracking. | Stable size. One record per stream. |
Database Partitioning
RTFS automatically manages database table partitioning for event and message blob tables. Partitioning keeps query performance stable as event volume grows by distributing data across manageable segments.
How Partitioning Works
- The
PartitionMakerJobruns on a schedule (default: every 30 minutes) and evaluates whether new partitions are needed. - New partitions are created when the current partition's primary key count reaches a configurable threshold percentage of the partition size.
- The
SubPartitionPrimaryKeyMonitoringJobmonitors sub-partition primary key counts and reports metrics.
Partitioning Properties
The following properties control partitioning behavior.
| Property | Default | Description |
|---|---|---|
rtfs.partition.job.interval.cron | 0 0/30 * ? * * | Cron schedule for the partition management job. |
rtfs.sub.partition.pk.monitoring.cron | 0 0 0 ? * * * | Cron schedule for sub-partition primary key monitoring (daily at midnight). |
rtfs.chunk.of.sub.partition.size | 7000000 | Maximum number of records per sub-partition chunk. |
rtfs.threshold.percentage.partition.creation.size | 50 | Percentage of partition capacity that triggers creation of a new partition. |
Partitioning Metrics
The following metrics track partition growth.
| Metric | Description |
|---|---|
jfrtfs_sub_partition_total_count | Total number of sub-partitions for a tenant and table. |
jfrtfs_sub_partition_pk_count | Number of sub-partitions with primary keys for a tenant and table. |
jfrtfs_repo_management_message_blob_duration_between_partition_creations | Time between message blob partition creations (milliseconds). |
jfrtfs_repo_management_events_duration_between_partition_creations | Time between events partition creations (milliseconds). |
Sizing Recommendations
The following table provides sizing guidelines based on deployment scale.
| Deployment Scale | Federated Repos | Estimated DB Size (steady state) | Recommended Resources |
|---|---|---|---|
| Small | < 10 | < 5 GB | 2 vCPU, 4 GB RAM |
| Medium | 10 - 100 | 5 - 50 GB | 4 vCPU, 8 GB RAM |
| Large | 100+ | 50+ GB | 8+ vCPU, 16+ GB RAM |
These are rough guidelines. Actual database size depends on event volume, binary task count, event retention period, and Full Sync frequency. For thread pool and replica sizing guidance based on deployment scale, see the Scaling and Sizing Guide.
Connection Pool Configuration
The following property configures the database connection pool.
| Property | Default | Description |
|---|---|---|
rtfs.db.lock.native.pool.size | 3 | Database lock pool size for coordinating concurrent operations. |
Maintenance
- Event cleanup: The
EventsCleanupJobremoves processed events older thanrtfs.events.cleanup.retention.time.Days(default: 3 days). - Orphan cleanup: The
MaintenanceCleanupJobremoves orphaned records (default: daily at 2:00 AM). - Partition monitoring: Monitor
jfrtfs_sub_partition_total_countandjfrtfs_sub_partition_pk_countmetrics to track partition growth. - Vacuuming: Standard PostgreSQL maintenance (VACUUM, ANALYZE) applies. Configure
autovacuumappropriately for high-event-volume deployments.
Frequently Asked Questions
This section provides answers to frequently asked questions.
FAQs
Q: Which Artifactory version supports a dedicated PostgreSQL database for RTFS?
A: Starting with Artifactory 7.146.7, you can run RTFS against a dedicated PostgreSQL instance while Artifactory continues to use its existing database.
Q: Can RTFS use the same database engine as Artifactory, such as Oracle or MySQL?
A: No. RTFS only supports PostgreSQL, but Artifactory can keep its existing Oracle, MySQL, or Microsoft SQL Server database unchanged.
Q: How does RTFS manage database partitioning?
A: The PartitionMakerJob runs on a schedule and creates new partitions automatically once the current partition's primary key count reaches a configurable threshold. See Database Partitioning for the properties that control this.
Q: How long are processed events retained before cleanup?
A: By default, the EventsCleanupJob removes processed events after 3 days, controlled by rtfs.events.cleanup.retention.time.Days.
Related Topics
Updated about 7 hours ago
