Use http agents for hook requests#4791
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4791 +/- ##
==========================================
- Coverage 92.69% 92.66% -0.03%
==========================================
Files 119 119
Lines 8679 8686 +7
==========================================
+ Hits 8045 8049 +4
- Misses 634 637 +3
Continue to review full report at Codecov.
|
|
Do you think this is mergable as is? |
flovilmart
left a comment
There was a problem hiding this comment.
Yeah let’s go, not a big deal
| /* Live query server configuration options (will start the liveQuery server) */ | ||
| liveQueryServerOptions: ?LiveQueryServerOptions; | ||
| /* Keep hook HTTP connections alive */ | ||
| hookKeepAlive: ?boolean; |
There was a problem hiding this comment.
Perhaps we should default to true? What would be the drawback?
There was a problem hiding this comment.
I think we should flip the default (and potentially make it not configurable) in the future. Just wanted to dip our toe in here.
There should be very little drawback to enabling this.
|
@TylerBrock I believe you forgot to run buildDefinitions to regenerate the parser and options mapper for the CLI :/ |
|
I'm so sorry, I was totally unaware we had to do that portion of it. Is that documented somewhere? |
|
No worry! My bad not catching it. To rebuild: |
We've found that hooks create an enormous amount of http traffic (including dns lookups, socket churning, and port exhaustion).
Using a NodeJS http(s) agent with keepAlive enabled in both the client sdk and parse-server has been valuable for us as we scale our production load so I'm proposing this change upstream as it might help others (and could potentially be the default when people feel comfortable).