Skip to content

Conversation

@href
Copy link
Contributor

@href href commented Feb 13, 2024

Previously loadbalancer pools were named as a combination of the service port protocol and outward bound port:

  • service.spec.ports[].protocol
  • service.spec.ports[].port

Since a name mis-match causes a pool to be recreated - an operation that takes around 30-45 seconds - a change in the port number caused the pool and its members to be recreated.

Since Kubernetes has the option to set a unique name for each service port, we can offer an approach that allows to change the port, without pool recreation in some cases:

  • If a service has only one port with no name and the port changes.
  • If a service uses names but keeps the names stable when changing ports.

In such cases, only the listener has to be re-created, which can be done in 10-15 seconds. There's still a slight downtime that has to be expected, but it is much shorter.

When the name changes, the pool still has to be recreated, which will be a bit unexpected, but for deployments that would like to add/remove/change a port with minimal downtime, there's now a way.

@href href requested a review from alakae February 13, 2024 16:16
@href href self-assigned this Feb 13, 2024
Previously loadbalancer pools were named as a combination of the
service port protocol and outward bound port:

- `service.spec.ports[].protocol`
- `service.spec.ports[].port`

Since a name mis-match causes a pool to be recreated - an operation that
takes around 30-45 seconds - a change in the port number caused the pool
and its members to be recreated.

Since Kubernetes has the option to set a unique name for each service port,
we can offer an approach that allows to change the port, without pool
recreation in some cases:

- If a service has only one port with no name and the port changes.
- If a service uses names but keeps the names stable when changing ports.

In such cases, only the listener has to be re-created, which can be done
in 10-15 seconds. There's still a slight downtime that has to be expected,
but it is much shorter.

When the name changes, the pool still has to be recreated, which will be
a bit unexpected, but for deployments that would like to add/remove/change
a port with minimal downtime, there's now a way.
@href href force-pushed the denis/service-port-mapping branch from 3424773 to cb05334 Compare February 13, 2024 16:18
@href href merged commit c73f6bb into main Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants