-
Notifications
You must be signed in to change notification settings - Fork 853
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
implement http client for mruby handler #637
Conversation
At 66677d3, the performance of a minimal Rack application decreased from 77,000 reqs / sec. to 68,000 reqs / sec. due to the overhead of context switch (between fibers). |
66467c4
to
f48b355
Compare
With commit e2f6d9e, it is now possible to write a mruby handler like below that issues HTTP requests. And the HTTP request issued by
(note: snippet update to reflect latest commit) ToDo:
|
5940c74
to
e2f6d9e
Compare
b273cd7
to
a077740
Compare
…s/mruby-input-steam
…s/mruby-input-stream
Conflicts: lib/handler/mruby.c t/50mruby.t
…ack apps cannot just pass the header downstream
…s/mruby-input-stream
c26d84c
to
a6b6dfb
Compare
implement http client for mruby handler
Still WIP.
As discussed in http://blog.kazuhooku.com/2015/11/mruby.html, by running the Rack application in a fiber context it is possible to return execution context to the event loop of h2o when a ruby method is called from the application.
This PR adopts the approach and will implement a HTTP client that can be called from the mruby handler. The feature will allow users to develop sophisticated reverse proxy on H2O (see #565).