Comments (4)
The thin example post is proxying to a local Unix socket.. so the connection time is zero-to-none.
Not sure how well this will work, but give it a try: wrap conn.server
call into EM.next_tick {}
. In theory, this should allow you to setup the callbacks and accept the connection, but defer the actual connection until next server tick..
If that doesn't work, then it's certainly doable.. but may require modifications to the current proxy code.
from em-proxy.
That worked. There was an additional difficulty needing to only next_tick
until the server is up, otherwise I was ending up with an unresponsive system. I don't completely understand why.
I posted a gist in https://gist.github.com/4259205 - I'd really appreciate any comments/suggestions/improvements, maybe there's a cleaner way to achieve this?
I'll close this issue, thanks.
from em-proxy.
Cool. re, gist: looks good.
from em-proxy.
Fyi, if anyone hits this page - I've used this in https://github.com/dblock/heroku-forward - it's a packaged implementation for beating the Heroku 60s boot timeout.
from em-proxy.
Related Issues (20)
- NoMethodError: undefined method `on_headers_complete=' for #<Http::NativeParser HOT 5
- Balancing sample doesn't seem to give a new server for every request HOT 2
- Spec: duplex TCP traffic to two backends google & yahoo is hanging HOT 2
- Can't proxy to pow's domains HOT 3
- Add support for proxying unix domain sockets (JRuby) HOT 6
- Backend selection based on sub-domain HOT 1
- No eventmachine 1.0 support? HOT 4
- On SIGINT foreman throws an error HOT 1
- Skip proxying and just send a response HOT 1
- Select backend on request data HOT 2
- Error HOT 1
- http_proxy.rb -- invalid request URI HOT 3
- http_proxy.rb -- breaking proxy request by adding/duplicating data HOT 6
- http_proxy.rb -- breaking proxy request by adding/duplicating data #52 HOT 2
- Can not re-open issue #52
- Missing licence in rubygems.org
- Missing LICENSE file in rubygem HOT 1
- Syntax error in examples/http_proxy.rb HOT 1
- 2 network HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from em-proxy.