Files
floci/docs/services
Abhigya 8d9ae9554d fix(elbv2): dispatch a shared listener port by the hostnames rules declare (#4207)
* fix(elbv2): dispatch a shared listener port by the hostnames rules declare

Two load balancers with a listener on the same port both answered 502.
Floci serves every load balancer from one socket per port, and listener
selection keyed only on the load balancer's own DNS name, so a request
carrying any other Host header matched neither key. With one load balancer
a size-1 fallback covered that up; adding a second removed the fallback and
silently broke both.

Listener selection now also consults the host-header conditions the
listener's rules already declare. A load balancer that names the hostname it
serves, which is the configuration AWS needs anyway, claims that hostname
here too. The DNS-name match and the single-listener fallback are unchanged
and still take precedence in that order.

A port taken by a second load balancer now logs a warning naming both, since
nothing else reported the collision: the targets behind them stay healthy and
no API call fails.

Real AWS has no load-balancer selection step, because every load balancer has
its own DNS name and addresses; host-header rules only choose a rule inside
one listener. Selecting a listener by Host header is a Floci deviation forced
by the shared socket, and is documented as one.

* test(elbv2): pin the AWS host-header matching semantics selection relies on

The AWS docs state that a hostname is not case-sensitive, that * matches 0
or more characters and ? exactly 1, and that the rule *.example.com matches
test.example.com but not example.com. Listener selection now depends on that
matching, so cover it directly: a case-shifted Host still resolves, and a
wildcard rule does not let its listener claim the bare domain.

Also record that HostHeaderConfig.RegexValues is unsupported, so a load
balancer naming itself only through a regex cannot be selected this way.
2026-09-23 00:39:31 -05:00
..
2026-05-10 11:53:31 -05:00
2026-08-21 00:09:04 -04:00