Node.js app acting as a proxy requesting given resources from its current network.
Can be used to generate synthetic traffic for warming up cache or simulate traffic from given location.
Post payload example:
{
"urls": [
"https://google.com"
]
}
Advanced example:
{
"urls": [
"https://google.com",
"https://google.com"
],
"priority": true,
"method": "HEAD",
"headers": {
"X-Sth": "true"
}
}
Array of urls to be requested. All urls will be placed at the of the queue.
Set urls as priority and put them in front of the queue.
Change request method to any valid HTTP value.
Provide additional headers to be included for all urls in current request.
{
"status": "ok",
"queued": Integer // number of elements in queue
}
By default response is returned immediately before completing url requests.
If you want to debug /ping
endpoint provide only one url in urls
and
append ?debug
parameter to the /ping?debug
.
Debug information will be provided both in console and in the response.
Display information about currently process requests and queue size.
If not 200 we have a problem.
config/config.json
contains global configuration including:
How many requests can be send at one time.
Default values for the /ping
API fields
npm install
npm start
Install Beanstalk CLI https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3.html
Create application with eb init
and create environment with eb create
command.
You can find some examples in /infra
folder.
After successful deployment application will run under
http://[app-name].[aws-region].elasticbeanstalk.com/