# Size S - Sonatype Nexus Repository - AWS Cloud-Native Reference Architecture

This Sonatype Nexus Repository size small reference architecture describes the minimum supported infrastructure specifications for deploying a single Sonatype Nexus Repository instance with an external PostgreSQL database in AWS using cloud-native services. It has been validated to support a baseline request load of **600 requests per second** (**36,000 requests per minute**) with spikes of 900–1,200 requests per second without failing.

This architecture is appropriate for an entry-level production Nexus Repository deployment and is suitable for small to medium teams operating development and CI/CD workloads.

## Infrastructure Specifications

This reference architecture defines a single-node Nexus Repository deployment supported by external infrastructure services.

The architecture includes the following layers:

- **Compute Layer** – Nexus Repository application runtime
- **Database Layer** – External PostgreSQL database
- **Storage Layer** – S3 object storage
- **Network Layer** – Optional load balancing and connectivity

### Compute Layer (Nexus Repository)

The compute layer comprises the Nexus Repository application and processes all repository requests, including artifact uploads, downloads, and metadata operations.

This layer meets the following specifications:

Single Nexus Repository node:

- 8 vCPU
- 32 GiB RAM

JVM configuration:
- Xms=16G
- Xmx=16G
- MaxDirectMemorySize=8G

Example AWS instance types:
- m8g.2xlarge
- m7g.2xlarge

Network throughput:
- ≥15 Gbps

The Nexus Repository node connects to an external PostgreSQL database and external blob storage. Local storage is used only for operational data and temporary files.

Recommended local storage configuration:
- Local NVMe SSD
- At least 300 GiB
- Minimum 3000 IOPS

### Database Layer (PostgreSQL)

This architecture uses an external PostgreSQL database to store repository metadata and configuration data.

This layer meets the following specifications:

- AWS RDS PostgreSQL instance
- Size db.r8g.large
- 2 vCPU
- 16 GiB RAM

### Storage Layer (S3 Object Storage)

Binary artifacts and repository assets are stored in an external Amazon S3 object storage.

This architecture uses a single S3 bucket.

As a best practice, you should also leverage the pre-signed URL feature so that artifact downloads are served directly from S3 rather than passing through the Nexus Repository node.

### Network and Security

At this scale, Nexus Repository may be accessed directly through the application node or through a load balancing layer. The provided Terraform for this size does provision a load balancer.

Apply standard network security practices, including the following:
- Restrict inbound access to the repository service ports
- Secure administrative access to the host instance
- Isolate repository infrastructure within a controlled network environment

## Limitations

This architecture provides a production-capable deployment but has several limitations due to its single-node design.

- The deployment consists of a single Nexus Repository node and does not provide application-level high availability.
- Node failure or maintenance events may require downtime.
- Automatic failover is not available without introducing additional application nodes.

## Deploying this Architecture

You can quickly deploy this reference architecture using [Sonatype's Nexus Repository Terraform configuration for an AWS deployments](https://github.com/sonatype/nxrm-reference-architectures). This automates the creation and configuration of all required AWS resources, including networking, compute, storage, and security components.

For full deployment details, see the README that accompanies the provided Terraform.
