can anyone tell me how do you guys containerize a ...
# telephony
c
can anyone tell me how do you guys containerize a webserver that has some endpoints written to trigger outbound calls and your livekit agent instance to deploy to a vps?
r
You should do some testing to verify your deployment can handle the loads you need. The statement that "Room Composite egress can use anywhere between 2-6 CPUs" means that each instance (or pod) of the Room Composite egress will utilize between 2 to 6 CPUs depending on the load and the specific requirements of the egress operation. If you are planning for 100 concurrent egress requests, you do not necessarily need to have 100 running pods. Instead, you should consider the following: 1. CPU Utilization: Each pod can handle multiple requests, but the exact number will depend on the complexity of the requests and the resources available. If each pod can handle, for example, 5 concurrent requests effectively, you would need approximately 20 pods to handle 100 concurrent requests. 2. Autoscaling: You can enable autoscaling based on the
livekit_egress_available
Prometheus metric. This allows your deployment to scale up or down based on the actual load, which can be more efficient than manually managing the number of pods. 3. Testing and Monitoring: It's advisable to conduct load testing to determine how many concurrent requests a single pod can handle under your specific conditions. You can use the
lk load-test
command to simulate the load and monitor the CPU usage. Here’s an example of how you might set up your autoscaling configuration in your `values.yaml`:
Copy code
autoscaling:
  enabled: true
  minReplicas: 1
  maxReplicas: 20
  targetCPUUtilizationPercentage: 60
This configuration allows your deployment to scale between 1 and 20 pods based on CPU utilization, which should help you manage the load effectively without needing to run 100 pods at all times. Summary • You do not need 100 pods for 100 concurrent requests; the number of pods required will depend on how many requests each pod can handle. • Consider enabling autoscaling to manage resources dynamically based on actual usage. • Perform load testing to find the optimal configuration for your use case. • https://github.com/livekit/cloud-egress/blob/main/README.md#L1-L37