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

participante lazaronixon #41

Merged
Merged
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
13 changes: 13 additions & 0 deletions participantes/lazaronixon/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Submissão para Rinha de Backend, Segunda Edição: 2024/Q1 - Controle de Concorrência

<img src="https://upload.wikimedia.org/wikipedia/commons/6/62/Ruby_On_Rails_Logo.svg" alt="logo ruby on rails" width="200" height="auto">
<img src="https://upload.wikimedia.org/wikipedia/commons/3/38/SQLite370.svg" alt="logo sqlite" width="200" height="auto">

## Francisco Zanfranceschi

Submissão feita com:
- `Ruby on Rails` para api
- `SQLite` como banco de dados
- [repositório da api](https://github.com/lazaronixon/rinha-de-backend-2)

[@lazaronixon](https://twitter.com/lazaronixon) @ twitter
45 changes: 45 additions & 0 deletions participantes/lazaronixon/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
version: "3.5"

services:
api01: &api
image: lazaronixon/rinha-de-backend-2
hostname: api01
environment:
- WEB_CONCURRENCY=0
- RAILS_MAX_THREADS=3
- RAILS_LOG_LEVEL=warn
- RAILS_MASTER_KEY=e06d20a258ff5ebf58ec20aac1eeeaea
volumes:
- storage:/rails/storage
deploy:
resources:
limits:
cpus: "0.65"
memory: "250MB"

api02:
<<: *api
hostname: api02

nginx:
image: nginx:latest
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- api01
- api02
ports:
- "9999:9999"
deploy:
resources:
limits:
cpus: "0.2"
memory: "50MB"

volumes:
storage:

networks:
default:
driver: bridge
name: rinha-nginx-2024q1
20 changes: 20 additions & 0 deletions participantes/lazaronixon/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
events {
worker_connections 1024;
}

http {
access_log off;

upstream api {
server api01:3000;
server api02:3000;
}

server {
listen 9999;

location / {
proxy_pass http://api;
}
}
}
Loading