The charm doesn't balance between mailman3-web unit for hyperkitty

Bug #1897642 reported by Benjamin Allot
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mailman 3 Core Charm
Confirmed
High
Unassigned

Bug Description

While looking at an issue, I found out that one of our 2 mailman3-web unit was having a hard time while the other was relatively less loaded.

More than twice the amount of requests [0].

I tried to determine a pattern based on the frequency of the target url of the request on the mailman3-web unit [1].
What I can see is that ALL "/mailman3/hyperkitty/api" calls are going to the first unit for some reason. And that comes from the mailman3-core unit.
Eventually found out that the configuration does target a single IP, the one of the first unit among the mailman3-web ones [2].

[0]: https://pastebin.canonical.com/p/BZ8CCSh63R/
[1]: https://pastebin.canonical.com/p/MznhZbnW9q/
[2]: https://git.launchpad.net/mailman3-core-charm/tree/reactive/mailman3_core.py#n250

Benjamin Allot (ballot)
summary: - The charm doesn't balance between mailman3-seb unit for hyperkitty
+ The charm doesn't balance between mailman3-web unit for hyperkitty
Revision history for this message
Haw Loeung (hloeung) wrote :

One solution is to have the charm install some kind of balancer, HAProxy, on the mailman3-core unit and configure backends to all the mailman3-web units from the relation data. Then have the template use this.

Tom Haddon (mthaddon)
Changed in mailman3-core-charm:
status: New → Confirmed
Revision history for this message
Tom Haddon (mthaddon) wrote :

One other possibility here is that we could simply point to the external hostname for the service (e.g. https://lists.canonical.com/mailman3/hyperkitty/). We currently have a bundle deploying apache2 as a frontend for that, with the following:

    # Don't allow access to HyperKitty API from outside
    <Location /mailman3/hyperkitty/api>
        Require all denied
    </Location>

We could update this to something like:

    # Only allow access to admin from the openstack tenant this service runs in
    <Location /mailman3/hyperkitty/api>
        Require ip 10.x.x
    </Location>

This would need testing to confirm it allows internal traffic and not external traffic. Note that the "hostname" config option for this charm isn't the hostname of the service itself, but of the mailman3-core unit, so if we did take this approach we'd likely need to add another config option to the charm for that.

Haw Loeung (hloeung)
Changed in mailman3-core-charm:
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.