I am currently conducting an assessment of the technology that can be used to develop an equity trading system and aim to have over 50,000 concurrent client connections to receive real time market data from the server. is it possible to implement grpc to achieve the goal? or is there a better option? please advice
CodePudding user response:
The answer is yes, but it will take some work to make it happen. In Java, the the client-side load balancer is responsible for setting up and tearing down connections. Two load balancers come by default: PickFirst and RoundRobin.
To run a realistic test, you probably want to copy-paste the RoundRobin implementation. Unlike PickFirst, the RoundRobin implementation eagerly creates connections to the target address. You can modify your copy to create 50,000 connections, and then use it when you set up your ManagedChannel
.
The details on getting this to fully work probably each deserve their own question/answer, but from a high level, these breadcrumbs should let you run your own experiment to confirm that yes, gRPC can handle tens of thousands of connections.