Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a load test of 10K requests per seconds to NGINX. #69

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions client-app/src/main/java/com/instana/test/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ static class SchedulingConfiguration {
@Autowired
private ApiImpl apiImpl;

@Scheduled(fixedRate=1_000)
@Scheduled(fixedRate = 1, initialDelay = 120_000)
@Span(value="recurrent-task", type = Span.Type.ENTRY)
void issueRequest() {
apiImpl.issueRequest();
}

}

}
}
153 changes: 136 additions & 17 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,140 @@
version: '3'
services:

client-app:
server-app:
build:
context: ./server-app
networks:
nginxmesh:
aliases:
- server-app
environment:
- INSTANA_DEV=1
- SERVER_PORT=8080
healthcheck:
test: ["CMD", "ping", "localhost:8080"]
interval: 8s
timeout: 30s
retries: 25
expose:
- "8080"

client-app-1:
build:
context: ./client-app
networks:
- nginxmesh
environment:
- INSTANA_DEV=1
- target_url=http://nginx-gateway:8080/nginx-demo
depends_on:
agent:
condition: service_healthy

client-app-2:
build:
context: ./client-app
networks:
- nginxmesh
environment:
- INSTANA_DEV=1
- target_url=http://nginx-gateway:8080/nginx-demo
depends_on:
agent:
condition: service_healthy

client-app-3:
build:
context: ./client-app
networks:
- nginxmesh
environment:
- INSTANA_DEV=1
- target_url=http://nginx-gateway:8080/nginx-demo
depends_on:
agent:
condition: service_healthy

client-app-4:
build:
context: ./client-app
networks:
- nginxmesh
environment:
- INSTANA_DEV=1
- target_url=http://nginx-gateway:8080/nginx-demo
depends_on:
agent:
condition: service_healthy

client-app-5:
build:
context: ./client-app
networks:
- nginxmesh
environment:
- INSTANA_DEV=1
- target_url=http://nginx-gateway:8080/nginx-demo
depends_on:
agent:
condition: service_healthy

client-app-6:
build:
context: ./client-app
networks:
- nginxmesh
environment:
- INSTANA_DEV=1
- target_url=http://nginx-gateway:8080/nginx-demo
depends_on:
agent:
condition: service_healthy

client-app-7:
build:
context: ./client-app
networks:
- nginxmesh
environment:
- INSTANA_DEV=1
- target_url=http://nginx-gateway:8080/nginx-demo
depends_on:
agent:
condition: service_healthy

client-app-8:
build:
context: ./client-app
networks:
- nginxmesh
environment:
- INSTANA_DEV=1
- target_url=http://nginx-gateway:8080/nginx-demo
depends_on:
agent:
condition: service_healthy

client-app-9:
build:
context: ./client-app
networks:
- nginxmesh
environment:
- INSTANA_DEV=1
- target_url=http://nginx-gateway:8080/nginx-demo

client-app-10:
build:
context: ./client-app
networks:
- nginxmesh
environment:
- INSTANA_DEV=1
- target_url=http://nginx-gateway:8080/nginx-demo
depends_on:
agent:
condition: service_healthy

nginx:
build:
Expand All @@ -24,24 +150,14 @@ services:
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/instana-config.json:/etc/instana-config.json
# Instana developers only: Include the following lines to override the nginx module, for local testing
#- ./nginx/ngx_http_opentracing_module.so:/opt/instana/nginx/ngx_http_opentracing_module.so:ro
#- ./nginx/ngx_http_opentracing_module.so:/usr/lib/nginx/modules/ngx_http_opentracing_module.so:ro
expose:
- "8080"

server-app:
build:
context: ./server-app
networks:
nginxmesh:
aliases:
- server-app
environment:
- INSTANA_DEV=1
- SERVER_PORT=8080
# Include the following lines to override the nginx module, for local testing
# - ./nginx/ngx_http_opentracing_module.so:/opt/instana/nginx/ngx_http_opentracing_module.so:ro
# - ./nginx/ngx_http_opentracing_module.so:/usr/lib/nginx/modules/ngx_http_opentracing_module.so:ro
expose:
- "8080"
depends_on:
agent:
condition: service_healthy

agent:
image: icr.io/instana/agent
Expand All @@ -64,6 +180,9 @@ services:
- INSTANA_DOWNLOAD_KEY=${download_key}
- INSTANA_AGENT_KEY=${agent_key}
- INSTANA_AGENT_ZONE=${agent_zone:-nginx-tracing-demo}
depends_on:
server-app:
condition: service_started
healthcheck:
test: ["CMD", "curl", "localhost:42699"]
interval: 8s
Expand Down
32 changes: 0 additions & 32 deletions nginx/nginx.conf

This file was deleted.

1 change: 1 addition & 0 deletions nginx/nginx.conf