12

Load balancing Nexus is currently not supported by Sonatype, except by putting a Nexus instance in front of two with smart-proxying enabled or via a newer feature.

Still, I gave it a shot, by sharing the filesystem with GlusterFS for the /storage, and trying to enable stickyness in the Apache Load Balancer config and in Nexus config for the UI.

With the UI I am failing miserably, as it seems the Nexus container does not honor the properties for setting the cookie value; using the following configuration at the moment:

For the storage it seems to work, by limiting to GET and HEAD requests only, still have to try opening to POSTs. I was also unsure about the possible collateral effects of scheduled jobs, so all were disabled in the "secondary" node.

Has anybody achieved some level of trustworthy configuration for load-balancing nexus? The UI is not actually important to be load-balanced, I would be happy enough with the storage.

3

2 Answers 2

8

Sonatype's Nexus 3 Pro supports High Availability through a couple of mechanisms that are collectively known as Component Fabric:

  • Peer-to-peer Repository Managers means there is no one master, also known as a single point of failure. Packages are replicated between the nodes to ensure they are eventually consistent.
  • Storage Backends mean you can use high durability storage such as S3.
  • Dynamic Nodes enable auto-scaling support to increase capacity when demand is high and decrease it when demand is low to reduce costs.

It's not really in Sonatype's interests to support HA for the community project as it would cannibalize some of the enterprise customers from their paid product.

5
  • Thanks, we are using Nexus pro licensed indeed, but we are stuck on v 2.x for the foreseeable future unfortunately. Apr 10, 2017 at 7:58
  • 1
    @ᴳᵁᴵᴰᴼ unfortunate indeed, any chance of setting up Nexus 3 as a mirror of Nexus 2? Apr 10, 2017 at 21:26
  • Is High Availability - Clustering (HA-C) in Nexus Repository Manager OSS as well ?
    – Nitul
    Dec 15, 2017 at 12:05
  • Doesn't deploying Nexus on Kubernetes essentially enable high availability, or am I getting this wrong?
    – lostsoul29
    May 25, 2018 at 15:50
  • @lostsoul29 It depends on the storage you are using. If you use k8s in AWS your EBS volumes will end up in a Availability Zone X. If this all your nodes in that instance die, you won't be able to mount the volume. So no HA here… Nov 12, 2019 at 10:30
0

As of now (2022) Sonatype Nexus3 only supports high availability through what they call "cloud resilient single-node deployment", which translates to a 1-replica k8s deployment. In this scenario it is Kubernetes that provides resiliency as it will replicate the pod in case of issues with the pod, the k8s cluster node, or the entire availability zone/datacenter.

There's no support for active/active redundant instances of Nexus3, even in the Pro version. Currently Nexus is in version 3.41. They say in their websie, thought, that they have plans to implement clustering HA (active/active).

Smart proxying is not a feature of Nexus3 and the link for "Component fabric" is broken. I assume they removed this feature.

Also they say in their website that HA requires a paid version (Nexus Pro and not Nexus OSS) but I think that this is inaccurate, since as long as it's k8s that is providing the resiliency, it works for both OSS and Pro versions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.