-
Notifications
You must be signed in to change notification settings - Fork 923
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from lazaronixon/participacao-lazaronixon
participante lazaronixon
- Loading branch information
Showing
3 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} | ||
} |