cloudfoundry / cloudfoundry/bosh

Feature request: Even distribution of IP addresses, when multiple subnets per AZ are available

Open
#2,622 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
2.1k
Forks
662
Avg merge
5h 25m
Merged PRs (30d)
2

Description

Is your feature request related to a problem? Please describe.

See background in "additional context" below

When a BOSH network contains multiple subnets for the same AZ, it will create VMs distributed into the specified AZs with even distribution. It will however take addresses from the first subnet, until that subnet is exhausted / filled. Only then will it move on to the next subnet, etc.

It is understood that this is an additional feature and should not change default behavior.

Describe the solution you'd like
It would be nice if BOSH could evenly distribute VMs into all available subnets evenly, as it does for AZs.

Describe alternatives you've considered

We are currently assigning static IP addresses manually from known pools, based on the subnets provided by the BOSH cloud config, and assign them manually.

Additional context

When deploying CF using BOSH on hyperscalers, very large CF foundations require NAT gateways in order to manage the apps' egress requests.

NAT gateways are finite resources and can be exhausted with connections. Using further NAT gateways requires separate subnets, at least on AWS and some other hyperscalers. In order to divide egress traffic onto these multiple NAT gateways, subnets are created, each of which is tied to a NAT gateway.

This is also why the even distribution of VMs to subnets becomes important, as it in turn distributes the egress from those VMs to the different NAT gateways.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named in the issue. Start by tracing BOSH's subnet allocation and AZ distribution paths, then determine where an opt-in even-subnet policy belongs across supported cloud providers. Done means VMs are distributed evenly across subnets for the same AZ without changing default allocation behavior, with coverage for subnet exhaustion and the new option.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
cloud, infrastructure, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.