Giter Site home page Giter Site logo

agitator's Introduction

#agitator

A reverse proxy for the FastAGI protocol

Features:

  • Request based routing

Routes FastAGI sessions depending on the request URI.

  • Load balancing

Distributes load evenly between FastAGI servers based on the number of active sessions or in a Round-Robin fashion.

  • HA - Failover

Routes traffic to stand-by servers when main server is not reachable, or has reached the number of maximum allowed sessions.

  • TLS

Offers strong encryption support for FastAGI sessions.

  • On the fly config reloading

Routing rules can be reloaded/altered on the fly without restarting the proxy or dropping any connections.

  • Syslog integration

Can send logging and debug data to a syslog server.

To install:

	go get github.com/zaf/agitator

To run:

	agitator -conf=/path/to/conf.file

There is also a simple Makefile that installs the agitator binary in /usr/local/bin and its config file in /usr/local/etc to help with system wide installation. Under the folder init startup scripts are provided for systemd based systems, for Red Hat and Debian based systems that use the old sysV init and for systems that use OpenRC.

Reloading the config file on-the-fly requires a Hangup signal to be sent to the agitator process. This can be done either by using the init scripts provided or with something like pkill -HUP agitator. This reloads the routing settings from the config file. To alter the general settings (like listening port or address) agitator must be restarted. A graceful shutdown option is available where agitator stops accepting new requests but waits for all active sessions to finish before exiting. To trigger it either use the init scripts or send an Interrupt signal (pkill -INT agitator) to the agitator process.

Topology examples:

A typical layout where agitator sits between one or more asterisk servers and one or more FastAGI servers routing AGI requests providing load balancing and/or high availability:

alt text

Agitator can make up for asterisk's lack of encryption support on the AGI protocol either by wrapping AGI sessions in TLS, sending the traffic over the network, unwrapping it and contacting the FastAGI server:

alt text

or by encrypting AGI traffic and directly communicating with TLS aware FastAGI servers:

alt text

An example of such a FastAGI server can be found here, using the Go AGI package. A Perl implementation can be found here using Asterisk::AGI and Net::Server::PreFork.

See sample config file for configuration details.


Copyright (C) 2014 - 2015, Lefteris Zafiris [email protected]

This program is free software, distributed under the terms of the GNU General Public License Version 3. See the LICENSE file at the top of the source tree.

agitator's People

Contributors

zaf avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

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.