Git Product home page Git Product logo

fcgipoold's Introduction

fcgipoold

This package is a fcgi-multiplexer that maintains a pool of fcgi worker processes while exposing a single fcgi interface. This kinda similar to apache's fcgid module or php-fpm and can be used e.g. with nginx. This is the missing link between a webserver and processes that implement the fcgi protocol.

Getting started

While being in the root dir of this repository run go build cmd/pool/poold.go and go build cmd/client/client.go to have the binaries in this directory and then run the poold process with ./poold -c ./client -n 10 -s 8000 -r 50. You should have a webserver running that forwards the incoming http requests via fcgi to a different process. See below for a nginx configuration. The next step assumes that you have nginx setup with the configuration below.

To test that everything is setup properly and runs fine run curl http://localhost and curl -X POST http://localhost. That should output Hello from FCGI child and Hello from FCGI child via POST respectively.

example nginx configuration

server {
    listen       80;
    server_name  localhost;
    location / {
            fastcgi_param SERVER_PROTOCOL $server_protocol;
            fastcgi_param REQUEST_METHOD $request_method;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_pass 127.0.0.1:9000;
    }
}

Limitiations & Status

This is a experimental POC and at this point in time only simple HTTP GET and POST Requests are supported. Feel free to contribute.

fcgipoold's People

Contributors

moolen avatar

Watchers

 avatar

Forkers

bchapman949

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.