Chapter 6. Deployment options on Kubernetes
When you create a site on Kubernetes, there are many options you can use. For example, you can set the number of pods and the resources allocated to each pod. This guide focusses on the following goals:
6.1. Scaling for increased traffic Copy linkLink copied to clipboard!
For optimal network latency and throughput, you can adjust the CPU allocation for the router using the router-cpu option. Router CPU is the primary factor governing Skupper network performance.
Increasing the number of routers does not improve network performance. An incoming router-to-router link is associated with just one active router. Additional routers do not receive traffic while that router is responding
Determine the router CPU allocation you require.
By default, the router CPU allocation is
BestEffortas described in Pod Quality of Service Classes.Consider the following CPU allocation options:
Expand Router CPU Description 1
Helps avoid issues with
BestEfforton low resource clusters2
Suitable for production environments
5
Maximum performance
If you are using the Skupper CLI, set the CPU allocation for the router using the
--router-cpuoption. For example:skupper init --router-cpu 2
$ skupper init --router-cpu 2Copy to Clipboard Copied! Toggle word wrap Toggle overflow If you are using YAML, set the CPU allocation for the router by setting a value for the
router-cpuattribute. For example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
6.2. Creating a high availability site Copy linkLink copied to clipboard!
By default, Kubernetes restarts any router that becomes unresponsive. (If you encounter router restarts, consider Section 6.1, “Scaling for increased traffic” in order to improve responsiveness.)
If the cluster where you are running Skupper is very busy, it may take time for Kubernetes to schedule a new router pod. You can "preschedule" a backup router by deploying two routers in a site.
If you are using the Skupper CLI, set the number of routers to
2using the--routersoption:skupper init --routers 2
$ skupper init --routers 2Copy to Clipboard Copied! Toggle word wrap Toggle overflow If you are using YAML, set the number of routers to
2by setting theroutersattribute:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Setting the number of routers to more than two does not provide increased availability and can adversely affect performance.
Note: Clients must reconnect when a router restarts or traffic is redirected to a backup router.