All Projects → cloudamqp → Amqproxy

cloudamqp / Amqproxy

Licence: mit
An intelligent AMQP proxy, with connection and channel pooling/reusing

Programming Languages

crystal
512 projects

Projects that are alternatives of or similar to Amqproxy

Tackle
💯 percent reliable microservice communication
Stars: ✭ 44 (-61.74%)
Mutual labels:  rabbitmq, amqp
Humusamqp
PHP 7 AMQP library
Stars: ✭ 70 (-39.13%)
Mutual labels:  rabbitmq, amqp
Yii2 Rabbitmq
RabbitMQ Extension for Yii2
Stars: ✭ 52 (-54.78%)
Mutual labels:  rabbitmq, amqp
Remit
RabbitMQ-backed microservices supporting RPC, pubsub, automatic service discovery and scaling with no code changes.
Stars: ✭ 24 (-79.13%)
Mutual labels:  rabbitmq, amqp
Bunny
Bunny is a popular, easy to use, mature Ruby client for RabbitMQ
Stars: ✭ 1,224 (+964.35%)
Mutual labels:  rabbitmq, amqp
Yii2 Queue
Yii2 Queue Extension. Supports DB, Redis, RabbitMQ, Beanstalk and Gearman
Stars: ✭ 977 (+749.57%)
Mutual labels:  rabbitmq, amqp
Rabbitmq Server
Open source RabbitMQ: core server and tier 1 (built-in) plugins
Stars: ✭ 9,064 (+7781.74%)
Mutual labels:  rabbitmq, amqp
Machinery
Machinery is an asynchronous task queue/job queue based on distributed message passing.
Stars: ✭ 5,821 (+4961.74%)
Mutual labels:  rabbitmq, amqp
Aiormq
Pure python AMQP 0.9.1 asynchronous client library
Stars: ✭ 112 (-2.61%)
Mutual labels:  rabbitmq, amqp
Rabbitroutine
Lightweight library that handles RabbitMQ auto-reconnect and publishing retry routine for you.
Stars: ✭ 77 (-33.04%)
Mutual labels:  rabbitmq, amqp
Spring Boot Rabbitmq
Spring Boot集成rabbitMQ实现消息推送
Stars: ✭ 24 (-79.13%)
Mutual labels:  rabbitmq, amqp
Amiquip
Pure Rust RabbitMQ client
Stars: ✭ 88 (-23.48%)
Mutual labels:  rabbitmq, amqp
Node Celery
Celery client for Node.js
Stars: ✭ 648 (+463.48%)
Mutual labels:  rabbitmq, amqp
Yii Queue
Queue extension for Yii 3.0
Stars: ✭ 38 (-66.96%)
Mutual labels:  rabbitmq, amqp
Aio Pika
AMQP 0.9 client designed for asyncio and humans.
Stars: ✭ 611 (+431.3%)
Mutual labels:  rabbitmq, amqp
Rabbitmqbundle
RabbitMQ Bundle for the Symfony2 web framework
Stars: ✭ 1,125 (+878.26%)
Mutual labels:  rabbitmq, amqp
Amqp
Go client for AMQP 0.9.1
Stars: ✭ 4,170 (+3526.09%)
Mutual labels:  rabbitmq, amqp
Servicebus
Simple service bus for sending events between processes using amqp.
Stars: ✭ 415 (+260.87%)
Mutual labels:  rabbitmq, amqp
Laravel Queue Rabbitmq
RabbitMQ driver for Laravel Queue. Supports Laravel Horizon.
Stars: ✭ 1,175 (+921.74%)
Mutual labels:  rabbitmq, amqp
Rabbus
A tiny wrapper over amqp exchanges and queues 🚌 ✨
Stars: ✭ 86 (-25.22%)
Mutual labels:  rabbitmq, amqp

AMQProxy

An intelligent AMQP proxy with AMQP connection and channel pooling/reusing. Allows e.g. PHP clients to keep long lived connections to upstream servers, increasing publishing speed with a magnitude or more.

In the AMQP protocol, if you open a connection the client and the server has to exchange 7 TCP packages. If you then want to publish a message you have to open a channel which requires 2 more, and then to do the publish you need at least one more, and then to gracefully close the connection you need 4 more packages. In total 15 TCP packages, or 18 if you use AMQPS (TLS). For clients that can't for whatever reason keep long-lived connections to the server this has a considerable latency impact.

This proxy server, if run on the same machine as the client can save all that latency. When a connection is made to the proxy the proxy opens a connection to the upstream server, using the credentials the client provided. AMQP traffic is then forwarded between the client and the server but when the client disconnects the proxy intercepts the Channel Close command and instead keeps it open on the upstream server (if deemed safe). Next time a client connects (with the same credentials) the connection to the upstream server is reused so no TCP packages for opening and negotiating the AMQP connection or opening and waiting for the channel to be opened has to be made.

Only "safe" channels are reused, that is channels where only Basic Publish or Basic Get (with no_ack) has occurred. Any channels who has subscribed to a queue will be closed when the client disconnects. However, the connection to the upstream AMQP server are always kept open and can be reused.

In our benchmarks publishing one message per connection to a server (using TLS) with a round-trip latency of 50ms, takes on avarage 0.01s using the proxy and 0.50s without. You can read more about the proxy here Maintaining long-lived connections with AMQProxy

Installation

Debian/Ubuntu:

wget -qO- https://packagecloud.io/cloudamqp/amqproxy/gpgkey | sudo apt-key add -
echo "deb https://packagecloud.io/cloudamqp/amqproxy/ubuntu/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/amqproxy.list

sudo apt update
sudo apt install amqproxy

Docker/Podman:

Docker images are published at Docker Hub. Fetch and run the latest version with:

docker run --rm -it -p 5673:5673 cloudamqp/amqproxy amqp://SERVER:5672

Then from your AMQP client connect to localhost:5673, it will resuse connections made to the upstream. The AMQP_URL should only include protocol, hostname and port (only if non default, 5672 for AMQP and 5671 for AMQPS). Any username, password or vhost will be ignored, and it's up to the client to provide them.

Installation (from source)

Install Crystal

shards build --release --production
cp bin/amqproxy /usr/bin
cp extras/amqproxy.service /etc/systemd/system/
systemctl enable amqproxy
systemctl start amqproxy

You probably want to modify /etc/systemd/system/amqproxy.service and configure another upstream host.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].