Context: IplanRioPeriod: 2026
in production

Rio Queue

A virtual waiting room that absorbs traffic spikes on Nota Carioca and the SuperApp.

My role

I built and maintain it. 167 of the 224 commits are mine.

75%
of the commits
1,000
concurrent sessions on the tax guide queue
2
protected systems, one of them legacy ASP.NET
SPAN 01 // CONTEXT

Problem

Around tax deadlines and campaigns, traffic to Nota Carioca and the SuperApp jumps all at once and the backends fall over. Nota Carioca is legacy ASP.NET, so changing it is slow and expensive.

SPAN 02 // IMPLEMENTATION

Solution

A self-hosted service in Python (FastAPI on Granian) backed by Valkey. The protected app adds one script tag with two attributes and nothing else. Anyone over the limit lands in a waiting room that streams their position and ETA over SSE. Admission follows a rate and a session cap, and a token is only valid on the queue that issued it.

SPAN 03 // DETAILS

Highlights

  • Works on the same domain (a .dados.rio cookie for the SuperApp) and across domains (token handoff to Nota Carioca on .gov.br).
  • Operated from a CLI with normal, pause (freezes the queue and keeps positions) and block (sends admitted users back to the room) modes, plus a bypass for internal staff and admission by session code for support.
  • Per-queue session extensions ("I need 5 more minutes") and cleanup of ghost users.
  • CDN-served script that works under a strict-dynamic CSP in Next.js with per-request nonces.
SPAN 04 // OUTCOME [200 OK]

Result

Live in front of Nota Carioca's tax guide issuance. In one production snapshot, 515 people were waiting and 422 of 1,000 slots were in use, with the app still up.

Quick actionsSwitch language to Português (PT-BR)
PT-BR
Quick actionsToggle light / dark theme
THEME
Quick actionsDownload résumé in Portuguese (PDF)
PDF · PT-BR
Quick actionsDownload résumé in English (PDF)
PDF · EN
Quick actionsCopy email address (fredzolio.dev@gmail.com)
COPY
NavigationProduction services and featured work
#servicos
NavigationAll projects
/en/projects/
NavigationCareer timeline
#carreira
NavigationTalks, hiring, documentation & open source
#atuacao
NavigationSkills & tooling
#stack
NavigationAcademic background, courses & languages
#formacao
NavigationContact & résumé
#contato
Projects & case studiesRio Queue
IplanRio · in production
Projects & case studiesPublic service search and recommendations
IplanRio · in production
Projects & case studiesCourses, jobs and employability API
IplanRio · in production
Projects & case studiesSuperApp load test
IplanRio · internal
Projects & case studiesNota Carioca data pipelines
IplanRio · in production
Projects & case studiesGCP cost investigation and Billing Guard
IplanRio · in production
Projects & case studiesEAí gateway and the city's MCP server
IplanRio · in production
Projects & case studiesCoding agent platform for developers
IplanRio · internal
Projects & case studiesAgents for infrastructure operations
IplanRio · internal
Projects & case studiesCity chatbot integrations
IplanRio · in production
Projects & case studiesGo email worker
IplanRio · in production
Projects & case studiesExecutive meeting room displays
IplanRio · in production
Projects & case studiesAlliomed
Vizo · in production
Projects & case studiesMaestro, a coding agent delivery pipeline
Vizo · internal
Projects & case studiesProventus
Vizo · in use by customers
Projects & case studiesSienge SaaS RPA
Vizo · sold
Projects & case studiesAWS infrastructure assessment
Vizo · client work
Projects & case studiesPLANEHAB Nosso Bairro
Freelance · live
Projects & case studiesConecta Solar
Freelance · live
Projects & case studiesVardis
Freelance · client work
Projects & case studiesLivinHub
Freelance · client work
Projects & case studiesNDC Nexus
New Data Company · prototype
Projects & case studiesWhatsApp group monitor
New Data Company · prototype
Projects & case studiesInternal ERP
New Data Company · internal
Projects & case studiesJungle Wallet
Personal · open source
Projects & case studiesZolioLab
Personal · internal
Projects & case studiesOSCE Cirurgia
Personal · prototype
Projects & case studiesENEM essay grading spike
Personal · experiment
Projects & case studiesGamePixzo
Personal · prototype
Projects & case studiesSurkai
Personal · open source