Implement rate limiting (#43)
* Implement ratelimiting
- by sending back '429 Too Many Requests' error message
- Error message is a HTTP/1.1 response, so contrail link local proxy works with it too.
- HAProxy sends back HTTP/1.0 responses, so using a template is required.
Only possible when using front-/backend configuration layout.
* Add options in frontend and backend.
Options are filtered by a blacklist of invalid options, as per haproxy manual.
* Add sls test for rate limiting configuration
* Update readme with rate limiting example
diff --git a/README.rst b/README.rst
index 06fd886..09bcdd7 100644
--- a/README.rst
+++ b/README.rst
@@ -427,6 +427,30 @@
port: 8443
params: 'maxconn 256'
+Implement rate limiting, to prevent excessive requests
+This feature only works if using 'format: end'
+
+.. code-block:: yaml
+ haproxy:
+ proxy:
+ ...
+ listen:
+ nova_metadata_api:
+ ...
+ format: end
+ options:
+ - httpchk
+ - httpclose
+ - httplog
+ rate_limit:
+ duration: 900s
+ enabled: true
+ requests: 125
+ track: content
+ servers:
+ ...
+ type: http
+
Read more
=========