How to calculate the number of hosts in leaf spine topology
How to calculate the number of hosts in leaf spine topology
When designing a network based on CLOS topology aka leaf spine topology, we need to determine the number hosts that a particular pod will contain. A simple way to determine this based on the switching infrastructure is
Total number of hosts ….: Leaf downlink ports * no. of leafs
Total number of leafs ….: Spine downlink ports
Total number of spine ….: Leaf uplink ports
Let’s consider an example, we want to deploy a network to connect up 400 physical servers that could potentially grow to 1000 servers in few years. Now we need to design a network that is able to meet the initial and growth requirements.
We will make assumptions that our network will be based on 1U leaf and spine switches.
Let’s say that the ports on our switches are
Leaf ….: 48 downlink ports and 8 uplink ports
Spine ….: 32 downlink ports
In a two tier network topology we will use a the following formula to determine the number of hosts that can be connected to network.
sPorts * lPorts
Where sPorts is number of ports in a spine switches and lPorts number of ports on the leaf switches.
32 * 48 = 1536
So in order to deploy 1000 servers we will need need 2 or 4 spine switches, and 21 leaf switches deployed in a two tier topology.
In reality though a typical 42U rack will usually house around 40 servers with the remaining 2Us for ToR rack switches. So a realistic number in for two tier leaf spine based on our switches will be 32 * 40 = 1280.
Another key factor which I skipped altogether is the oversubscription ratio.