-
Notifications
You must be signed in to change notification settings - Fork 74
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
[Proposal] Replace ConnectionReset to Rails executor #134
Comments
@le0pard Thanks! This is interesting. It seems this is only supported in Rails 5.0+, do we have an idea of Rails version compatibility here? It does seem more promising than the current interceptor approach. Some questions I have from the docs:
Would this potentially lock incoming gRPC requests during constant autoloading? I wonder how that would impact tail latencies on boot (potentially affecting "healthy status" checks in container schedulers). Definitely worth an investigation. Thanks for the proposal. |
Thanks @splittingred
Looks like yes. For old rails we can leave
Maybe, this need to be checked. That is why I pointed to anycable, which have internal grpc server and found how they resolving such issue. |
I did similar work on my fork to enable code reloading. However I had to do one extra thing not mentioned here to get my controllers to reload. Currently, Gruf's There is probably a few ways to refresh this reference. I went the dumb simple way of doing a constant lookup. see here reloader.to_prepare do
controller = controller.name.constantize
end |
Based on rails docs: https://guides.rubyonrails.org/threading_and_code_execution.html#executor
Here how it can be done in gruf:
Interseptor itself (not tested - code provided as example):
In this case no need care about close connections for Activerecord and also fixing issues to other databases (like release connections to redis), which not covered by gruf, but covered by rails.
Also
So it may help to reach this #115 and #86
The text was updated successfully, but these errors were encountered: