Giter Site home page Giter Site logo

example-node-ops's Introduction

Example nginx, haproxy, pool-hall, node application

Running

This is designed to work on linux systems where you have node, npm, haproxy, and nginx installed, ideally from your distro's package manager of choice.

Make sure you have ports 9000-9005 open

nginx

nginx -c nginx.conf -p ./

haproxy

haproxy -f haproxy_example.cfg

node example_app

npm install
npm start

With this you should be able to make requests on http://localhost:9000/health and see 'OK'

example-node-ops's People

Contributors

schleyfox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

example-node-ops's Issues

haproxy load balancing

Hi,

I've benched the haproxy configuration in front of 2 nodes, and the requests were not load balanced. To make it work, I had to change the load balancing algorithm to leastconn.

Running load testing on this setup is slower than running directly on node worker

Hi,

First of all thanks for the example and the great article.
I configured the project and tried to run some load testing tools (siege, autocannon) on my machine to see the difference, but I actually noticed that it's much slower with the nginx+haproxy+cluster setup than running directly on one single worker instance.

autocannon localhost:9000/health caps at around 200 req/s
autocannon localhost:9002/health caps at around 5110 req/s (the worker process)

Did I misunderstand something or is it a problem of my computer?

Thanks

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.