Implementing a Gerrit Multi-Master Setup with AWS Load Balancers & Kafka

168 views
Skip to first unread message

Hamid Narimani

unread,
Mar 4, 2024, 1:59:11 AM3/4/24
to Repo and Gerrit Discussion
Dear Gerrit Community,
I'm currently in the process of configuring a Gerrit multi-master setup.
My setup incorporates AWS Load Balancers and Kafka running on EC2 with Docker Compose. I'd like to share some insights and seek advice on a few challenges encountered, especially regarding session continuity and configuration conflicts.

Key Components:
Gerrit Multi-Master Configuration: Enhancing fault tolerance and load distribution.
EFS: mounted git on both master
RDS MYSQL: is same for both master
Region: both on same region and VPC
AWS Load Balancers: Using ALB for HTTP/HTTPS and NLB for SSH.
Kafka & ZooKeeper on EC2/Docker Compose
Configuration and Challenges:
AWS ALB and NLB required fine-tuning to support sticky sessions essential for maintaining user session integrity in OAuth flows.

Encountered a Guice Binding Conflict when integrating ZooKeeper, highlighting the complexities of configuring a multi-master setup. This issue has been particularly challenging, and I'm seeking insights or solutions from the community.

Exception in thread "main" com.google.inject.CreationException: Unable to create injector, see the following errors:1) [Guice/BindingAlreadySet]: AllUsersName was bound multiple times.Bound at:

1  : InitModule.configure(InitModule.java:47)

2  : ZkInit$1.configure(ZkInit.java:90)

Learn more:

  https://github.com/google/guice/wiki/BINDING_ALREADY_SET1 error======================

Full classname legend:

======================

AllUsersName: "com.google.gerrit.server.config.AllUsersName"

As I work through these challenges, particularly the session continuity issue and the Guice binding conflict, I'm re-evaluating the architecture, specifically the use of AWS Load Balancers for this setup. I'm curious about the community's thoughts on the viability of this setup and whether switching to a solution like HAProxy might offer a more streamlined or effective approach, especially in the context of Gerrit's multi-master configuration.

Thank you for any guidance or insights you can provide.

Marcin Czech

unread,
Mar 5, 2024, 3:49:07 AM3/5/24
to Hamid Narimani, Repo and Gerrit Discussion
Hi Hamid,

If you would like to get more context how to setup Gerrit multi-site using AWS infrastructure you can have a look at https://gerrit.googlesource.com/aws-gerrit/ This projects contains a collection of AWS CloudFormation templates and scripts to deploy Gerrit in AWS

Best regards,
Marcin Czech

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/22387932-6559-4822-9ace-6bab6f88abb0n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages