Giter VIP home page Giter VIP logo

Comments (5)

nfriedly avatar nfriedly commented on July 23, 2024

@emilhem & @mikaelhm - what do you guys think?

from node-unblocker.

emilhem avatar emilhem commented on July 23, 2024

I actually don't use redis for my proxy. I started rewriting it for a similar scenario that you describe above but the web server started saying no after I visited a few websites because of the tremendous amount of cookies being sent to the server. Also the overhead of all the cookies will slow everything down quite a lot. Instead I just let the built in session handler in connect handle saving the cookies to the session. It will erase any cookies at server restart but it doesn't matter since the server never dies for me. Our source codes are very different now though since I have user login and an admin interface where you can manage the white-list built in.

I think the idea of making the proxy more independent and modularizable is a good idea. Then you can implement user login/signup and an admin page as well. You're free to use my poorly commented source code if you want.

from node-unblocker.

nfriedly avatar nfriedly commented on July 23, 2024

Instead I just let the built in session handler in connect handle saving the cookies to the session.

Are you only running a single server process? The recommended mode is one process per CPU core (Although it's the same if you have a single-core CPU). Connect's in-memory session handler can't share data across processes which is why I went with Redis initially.

(Sorry if you get this comment twice, github is acting funky)

from node-unblocker.

emilhem avatar emilhem commented on July 23, 2024

Yes. I removed the multiprocess functionality. Have you actually made any performance measurements comparing multiprocess vs single process?

from node-unblocker.

nfriedly avatar nfriedly commented on July 23, 2024

This is now done in the 1.0 release. Cookies have their path's scoped to the site and I have a bit of extra code in place to copy cookies over when switching protocol or subdomain. No red is required!

I also made a number of other changes in the vein of modularizing things: the proxy is now available as an express-compatible library and you can add your own processing hoooks and remove or reconfigure all of the built in ones.

from node-unblocker.

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.