-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for Throttling and Rate Limiting (#27)
* fixed an issue with the AWK script discovering api-gateway-graphite * updated api-gateway-cachemanager to 1.0.1 * added throttling / rate limiting support * updated the restart logic for api-gateway-zmq-adaptor * Replaced non-functioning download URLs for ZMQ (#29) * Fixed building issues with the ZMQ packages downloaded from GitHub (#30) * Replaced non-functioning download URLs for ZMQ * Fixed building issues with the ZMQ packages downloaded from GitHub
- Loading branch information
Showing
7 changed files
with
209 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# VHost exposing an API for Gateway Tracking Service ( GTS ) to control the Gateway | ||
# This VHost should listen on a PORT that is never exposed externally | ||
# This VHost should use a server_name matching the hostname | ||
|
||
server { | ||
listen 5000 default_server; | ||
|
||
# | ||
# Sample message to start tracking requests that match with the given format | ||
# { | ||
# "id": 222, | ||
# "domain" : "cc-eco;cceco-consumer;*", | ||
# "format": "$publisher_org_name;$consumer_org_name;$api_key", | ||
# "expire_at_utc": 1408065588, | ||
# "action" : "track", | ||
# "data" : 0 | ||
# } | ||
# | ||
location /tracking { | ||
access_log /var/log/api-gateway/access.log; | ||
limit_except POST { | ||
deny all; | ||
} | ||
content_by_lua 'ngx.apiGateway.tracking.POST_HANDLER()'; | ||
} | ||
|
||
# | ||
# location returning all TRACKing rules | ||
# | ||
location /tracking/track { | ||
access_log /var/log/api-gateway/access.log; | ||
limit_except GET { | ||
deny all; | ||
} | ||
default_type 'application/json'; | ||
content_by_lua 'ngx.apiGateway.tracking.GET_HANDLER("TRACK")'; | ||
} | ||
|
||
# | ||
# location retuning all BLOCKing rules | ||
# | ||
location /tracking/block { | ||
access_log /var/log/api-gateway/access.log; | ||
limit_except GET { | ||
deny all; | ||
} | ||
default_type 'application/json'; | ||
content_by_lua 'ngx.apiGateway.tracking.GET_HANDLER("BLOCK")'; | ||
} | ||
|
||
# | ||
# location returning all DELAYing rules | ||
# | ||
location /tracking/delay { | ||
access_log /var/log/api-gateway/access.log; | ||
limit_except GET { | ||
deny all; | ||
} | ||
default_type 'application/json'; | ||
content_by_lua 'ngx.apiGateway.tracking.GET_HANDLER("DELAY")'; | ||
} | ||
|
||
# | ||
# location returning all REWRITE rules | ||
# | ||
location /tracking/rewrite { | ||
limit_except GET { | ||
deny all; | ||
} | ||
default_type 'application/json'; | ||
content_by_lua 'ngx.apiGateway.tracking.GET_HANDLER("REWRITE")'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters