Skip to content

Commit

Permalink
Merge pull request #41 from lazaronixon/participacao-lazaronixon
Browse files Browse the repository at this point in the history
participante lazaronixon
  • Loading branch information
zanfranceschi authored Feb 8, 2024
2 parents 5bea8af + 0c2fd9d commit 3bbe92d
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 0 deletions.
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;
}
}
}

0 comments on commit 3bbe92d

Please sign in to comment.