Feature Request: “High Availability” with Autocert #21

Open
opened 2025-12-29 09:21:41 +01:00 by adam · 2 comments
Owner

Originally created by @polds on GitHub (Jan 9, 2025).

Hi, it’d be nice to be able to scale out GoDoxy to a few nodes to provide a more highly available solution. It should already work (haven’t tested) if you bring your own certs, but it’d be nice to have support with autocert. I imagine to do so, some basic locking, or leader election would need to be implemented (or just add a Redis node to the compose file) so only one instance attempts to register certs at a given time. It would require a clustered file system unless they could share the certs with each other which would need service discovery 😅 though I guess if you have the docker hosts enabled, there’s already some amount of service discovery happening.

Anyways, I over complicated the problem, but it would be nice to be able to run multiple with Autocert.

Originally created by @polds on GitHub (Jan 9, 2025). Hi, it’d be nice to be able to scale out GoDoxy to a few nodes to provide a more highly available solution. It _should_ already work (haven’t tested) if you bring your own certs, but it’d be nice to have support with autocert. I imagine to do so, some basic locking, or leader election would need to be implemented (or just add a Redis node to the compose file) so only one instance attempts to register certs at a given time. It would require a clustered file system unless they could share the certs with each other which would need service discovery 😅 though I guess if you have the docker hosts enabled, there’s already some amount of service discovery happening. Anyways, I over complicated the problem, but it would be nice to be able to run multiple with Autocert.
Author
Owner

@yusing commented on GitHub (Jan 9, 2025):

Could you elaborate more about it? Multiple machines running same services?

@yusing commented on GitHub (Jan 9, 2025): Could you elaborate more about it? Multiple machines running same services?
Author
Owner

@polds commented on GitHub (Jan 10, 2025):

No, sorry I'm meaning the ability to horizontally scale GoDoxy to multiple instances.

graph TD
    subgraph User Requests
        User1[User] --> GoDoxy1[GoDoxy Instance 1]
        User1[User] --> GoDoxy2[GoDoxy Instance 2]
        User1[User] --> GoDoxyN[GoDoxy Instance n]
    end

    subgraph GoDoxy Instances
        GoDoxy1 --|Handles Traffic|--> Applications
        GoDoxy2 --|Handles Traffic|--> Applications
        GoDoxyN --|Handles Traffic|--> Applications
    end

    subgraph Let's Encrypt Renewal
        GoDoxy1 --> Election[Leader Election]
        GoDoxy2 --> Election
        GoDoxyN --> Election
        Election -->|Leader| Leader[Leader GoDoxy]
        Leader -->|Renew Certs| ACME[Let's Encrypt]
        ACME --> Leader
        Leader -->|Distributes Certs| GoDoxy1
        Leader --> GoDoxy2
        Leader --> GoDoxyN
    end

But with Let's Encrypt all the instances attempt to renew the certificate which causes issues.

@polds commented on GitHub (Jan 10, 2025): No, sorry I'm meaning the ability to horizontally scale GoDoxy to multiple instances. ```mermaid graph TD subgraph User Requests User1[User] --> GoDoxy1[GoDoxy Instance 1] User1[User] --> GoDoxy2[GoDoxy Instance 2] User1[User] --> GoDoxyN[GoDoxy Instance n] end subgraph GoDoxy Instances GoDoxy1 --|Handles Traffic|--> Applications GoDoxy2 --|Handles Traffic|--> Applications GoDoxyN --|Handles Traffic|--> Applications end subgraph Let's Encrypt Renewal GoDoxy1 --> Election[Leader Election] GoDoxy2 --> Election GoDoxyN --> Election Election -->|Leader| Leader[Leader GoDoxy] Leader -->|Renew Certs| ACME[Let's Encrypt] ACME --> Leader Leader -->|Distributes Certs| GoDoxy1 Leader --> GoDoxy2 Leader --> GoDoxyN end ``` But with Let's Encrypt all the instances attempt to renew the certificate which causes issues.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/godoxy#21