Git Product home page Git Product logo

Comments (4)

igrigorik avatar igrigorik commented on August 28, 2024

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.

dblock avatar dblock commented on August 28, 2024

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.

igrigorik avatar igrigorik commented on August 28, 2024

Cool. re, gist: looks good.

from em-proxy.

dblock avatar dblock commented on August 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.