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

final #1680

Merged
merged 1 commit into from
Mar 11, 2024
Merged

final #1680

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
10 changes: 5 additions & 5 deletions participantes/vgdss/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: "3.5"
x-db-connection-settings: &db-connection-settings
CREBITO_DB__uri: "postgresql+asyncpg://user:password@127.0.0.1/crebito"
CREBITO_DB__pool_size: 10
CREBITO_DB__max_overflow: 5
CREBITO_DB__max_overflow: 10
CREBITO_DB__pool_timeout: 60
CREBITO_DB__pool_recycle: 1800
CREBITO_DB__echo: false
Expand All @@ -12,12 +12,12 @@ x-healthcheck-settings: &default-healthcheck
interval: 1s
timeout: 3s
retries: 5
start_period: 2s
start_period: 1s

services:
api1: &api
image: docker.io/vgdss/crebito:latest
pull_policy: always
#pull_policy: always
hostname: api1
container_name: rinha-api1
depends_on:
Expand Down Expand Up @@ -67,7 +67,7 @@ services:
deploy:
resources:
limits:
cpus: "0.2"
cpus: "0.1"
memory: "50MB"
healthcheck:
<<: *default-healthcheck
Expand All @@ -89,7 +89,7 @@ services:
deploy:
resources:
limits:
cpus: "0.4"
cpus: "0.5"
memory: "300MB"
healthcheck:
<<: *default-healthcheck
Expand Down
22 changes: 12 additions & 10 deletions participantes/vgdss/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ events {
worker_connections 1024; # Reduzido de 1024 para economizar memória, já que a carga é de ~251 req/s.
use epoll;
accept_mutex off; # set to 'on' if nginx worker_processes > 1
multi_accept on;
}

http {
Expand All @@ -19,33 +20,34 @@ http {
tcp_nopush off; # Desativar, pois não estamos preocupados com otimização de cabeçalhos.
tcp_nodelay on; # Manter ativado para enviar respostas HTTP rapidamente.

keepalive_requests 5000;
keepalive_requests 1000;
keepalive_timeout 120;

proxy_connect_timeout 75s;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;

upstream api {
server 127.0.0.1:8001; # API 1
server 127.0.0.1:8002; # API 2
keepalive 8;
keepalive 32;
}

server {
listen 9999;

server_tokens off;
client_max_body_size 20M;
#server_tokens off;
#client_max_body_size 20M;

location / {
proxy_pass http://api;
proxy_ignore_client_abort on;
proxy_connect_timeout 65s;
proxy_read_timeout 65s;
proxy_send_timeout 65s;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_buffering off;
#proxy_ignore_client_abort on;
#proxy_connect_timeout 65s;
#proxy_read_timeout 65s;
#proxy_send_timeout 65s;
#proxy_redirect off;
#proxy_buffering off;
}
}
}
4 changes: 2 additions & 2 deletions participantes/vgdss/postgresql.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
listen_addresses='*'
max_connections = 40
max_connections = 100

# Configurações de Log
log_destination = 'stderr'
Expand All @@ -12,4 +12,4 @@ log_duration=off
log_lock_waits=off
log_error_verbosity=terse

shared_buffers = 80MB
shared_buffers = 75MB
Loading