This is the small daemon to forward HTTP requests when response is known or unimportant.
When a http request is arrived the yup daemon (yupd), it answers 200 OK (customizable). Then the yupd forwards the http request to the specified host and retries if a timeout error was happend.
By default, nonpersistent queue is used. A limit (the option –watermark) at which new concurrent requests will be dropped.
If you want use persistent queue you need to specify the option –persistent with a path to a database.
One of use cases
For example we can have a rails app which send exceptions to an Errbit by the gem airbrake. We know the errbit can be not available by network issues or some else reasons, but we do not want to lose exceptions. To resolve this problem we can start yupd on the same host with the rails app:
yupd --listen localhost:8081 --status-code 201 --persistent /var/db/yupd-errbit errbit.host.somewhere
Reconfiguration of hoptoad_notifier is very ease:
HoptoadNotifier.configure do |config| config.host = "localhost" # yupd host config.port = 8081 # yupd port config.api_key = "api_key_for_your_app" end
Now problem of availability errbit is assigned to the yupd.
Contributing to yup
Feel free to contribute.
Copyright © 2011 Denis Sukhonin. See LICENSE.txt for further details.