Handling 5000 websocket connections with axum server #3087
sumit-kumar-iitm
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using axum server for handling websocket connections. I am reading messages from kafka topic and if the websocket connection is established to receive messages from a particular session then the message will be relayed on to that connection.
I am facing issues when I am load testing the application for 5000 connections (4CPU and 8GB RAM). I am getting i/o timeout error on client side.
I am benchmarking this service against Java spring boot but java service is working fine with very low latency and the configuration is same.
I am sharing the code snippet, though I am using the standard code from example
the handler function of websocket is adding entry to ACTIVE_SESSIONS. On the other hand, kafka consumer consumes and check if there is a message for an already established connection and send it to that connection.
Can I get some help how to make it better??
Beta Was this translation helpful? Give feedback.
All reactions