Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to hit more than 5 clients simultaneously to gRPC-to-gRPC Streaming gateway #36

Closed
ykalidin opened this issue Mar 4, 2019 · 4 comments

Comments

@ykalidin
Copy link
Contributor

ykalidin commented Mar 4, 2019

For gRPC-to-gRPC Streaming, when multiple clients hit the gateway only 5 client connections successful and are able to send and receive messages through gateway.The gateway assigns worker threads to first 5 client calls. The other clients send messages to gateway but are not assigned a worker request to proceed with streaming. These clients are waiting till the other client closes connections.

Steps to Reproduce
1)git clone https://github.com/project-flogo/grpc
cd grpc/examples/api/grpc-to-grpc
go build
2)Start proxy gateway:
./grpc-to-grpc
3)Start sample gRPC server.
./grpc-to-grpc -server
4)Run 6 clients in different terminals
./grpc-to-grpc -client -port 9096 -method bulkusers
5)It is seen that the 5 clients are assigned workers but 6th client is not assigned a worker and is kept in wait state until a previous client is killed.

Note:
It is observed that FLOGO_RUNNER_WORKERS default value is 5. The clients connecting is directly proportional to FLOGO_RUNNER_WORKERS value.
Also the same is not observed using the old mashling code.
https://github.com/TIBCOSoftware/mashling/
https://github.com/TIBCOSoftware/mashling-recipes

@pointlander
Copy link
Contributor

Try running 'FLOGO_RUNNER_TYPE=DIRECT ./grpc-to-grpc'.

@ykalidin
Copy link
Contributor Author

ykalidin commented Mar 5, 2019

@pointlander It worked with FLOGO_RUNNER_TYPE=DIRECT.
I just want to know how this flag works.

@pointlander
Copy link
Contributor

Flogo uses a runner to execute actions. There are two types of runners: DIRECT and POOLED. The default runner type is POOLED. POOLED uses a pool of runners (default pool size is 5) to execute actions. The 'bulkusers' method ties up the workers which prevents other requests from happening. The DIRECT runner directly executes the action and doesn't have a limit on the number of simultaneous actions being executed.

@ykalidin
Copy link
Contributor Author

Working as expected with the FLOGO_RUNNER_TYPE=DIRECT change,Closing the Issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants