Skip to main content

Database Options

Note

We highly recommend that you have your Nexus Repository 3 instance use an external PostgreSQL database. See our documentation on configuring Nexus Repository Pro for an external PostgreSQL database or on migrating an existing Nexus Repository 3 instance to a PostgreSQL database.

DatabaseOptions for Nexus Repository

Nexus Repository has a few database options:

  1. An external PostgreSQL database (Preferred) PRO

  2. An embedded H2 database PRO

  3. An embedded OrientDB database

This topic will explain the database options and benefits to an external database.

Choosing a Database Mode

We recommend that all new and existing Nexus Repository Pro deployments use PostgreSQL or H2. Using PostgreSQL will help organizations meet their resiliency, scaling, and business continuity requirements. PostgreSQL should be used for any centralized repository which requires fault-tolerant deployments.

The table below can help you choose the appropriate database mode for your deployment:

Database Mode

Appropriate For

External PostgreSQL (Preferred)

PRO

  • Moderate or large workloads

  • Enterprise deployments

  • Mission-critical deployments of any size

  • Cloud deployments (AWS, Azure)

  • Deployments in Kubernetes

  • Deployments planning to use a resiliency deployment model

  • Dynamic backups for a shorter maintenance window

Embedded H2 PRO

  • Smaller workloads (supported* maximum 20,000 requests per day and 100,000 components)

  • Single-team deployments

  • Non-mission-critical deployments

  • Disposable deployments (e.g., temporary proxies)

Embedded OrientDB(Legacy)

  • Existing Pro deployments that are not ready to migrate

  • Existing deployments using third-party or community plugins not yet converted to PostgreSQL

  • Repository OSS deployments

  • Smaller workloads (supported* maximum 20,000 requests per day and 100,000 components)

  • Non-container environments

* If using Sonatype Nexus Repository beyond these supported levels, it may become unstable and behave in unexpected ways. Sonatype will not be able to guarantee our ability to support Sonatype Nexus Repository usage beyond these limits.

Benefits of an External Database

There are a number of benefits to using an external database:

  • Easier to scale deployment; required for our High Availability Deployment Options

  • Leverage managed fault-tolerant cloud databases: AWS Aurora, RDS, Azure, etc.

  • Improved container orchestration such as Kubernetes and OpenShift

  • Fully available during backups

  • Support for multi-AZ cloud deployment models

  • Simpler and easier disaster recovery

75831830.png

Embedded Mode for Nexus Repository

Nexus Repository provides an embedded database mode with improved speed using H2 instead of OrientDB. This mode is appropriate for the following scenarios:

  • Teams and smaller organizations with non-mission-critical Nexus Repository needs

  • Automatically provisioned, disposable Nexus Repository instances (e.g., pools of proxy-only instances used to shield a primary instance from a heavy read load)

Migration Information

If you are considering moving from OrientDB to H2 or PostgreSQL, read the following to stand up or migrate your instance:

Warning

  1. Unsupported formats will not be migrated; you will not be able to add new formats that your new database does not support. Review Feature Availability for PostgreSQL and H2 Databases and ensure that your new database supports all of your formats before attempting the migration.

  2. Migration is a one-time process; attempts to migrate again will overwrite data.