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

Asynchronously stream requests to upstream when possible [feature] #251

Merged
merged 1 commit into from Jun 6, 2017

Commits on Jun 6, 2017

  1. Asynchronously stream requests to upstream when possible [feature]

    Old implementation did buffering for any data that comes in and out of
    the gateway, which produce several drawbacks:
    
    1. Memory usage was high
    2. Network I/O had many peaks (read full body and then send it to
    upstream)
    3. Higher latency (now upstream accepts connection almost instantly)
    4. It was impossible to send large files, because they consumed lots of
    memory on gateway side.
    
    Current implementation will buffer only requests with application/json
    content-type, allowing Logger to save them.
    
    Future plans:
    - Find smarter way to log requests (by dropping secure data).
    - Use feature flags to async proxying JSON data.
    AndrewDryga committed Jun 6, 2017
    Copy the full SHA
    b279358 View commit details
    Browse the repository at this point in the history