Hey I am new-comer into the language which came to my knowledge while contributing to LavinMQ.
The first opportunity for me to understand the language more deeply is the Brazilian Brawl - an annual country-wide hackathon 4fun with backend challenges. This year the challenge is to write an API that can integrate with another API by which may or may-not be failing.
It’s a great exercise for overall engineering and it’s all allowed.
I am asking wether anyone want’s to nerd about much I can push forward for performance using Crystal.
Limitations:
- Use only 350MB RAM
- Use only 1.5vCPU
- Needs 1 LB
- Needs 2 Apps
- Total amount of requests + processed $$ should be consistent with your backend + the processors.
My current solution and performance-points:
- Crystal 1.17
- Write API
- Read API + Worker to integrate/call external APIs.
- The
worker
stores in-memory SkipList to run RANGE queries with SUM - NGINX load balances writes and ponts READS into the worker.
My code repo: GitHub - lukas8219/rinha-de-backend-2025: Crystal, LavinMQ, NGINX, Circuit Breaker
What I wanted to ask and discuss:
- How fast can I make the p99?
- Is there any clear performance issues with my code regarding Crystal best practices?