Ria Choi
← Portfolio

KOK

A team restaurant reservation backend where I focused on gateway behavior, deployment visibility, and performance checks.

KOK

KOK combines restaurant reservations and in-person waitlists. I worked on the gateway and user-service delivery, where my priority was making it possible to diagnose what happened between a browser request and the service that handled it. I contributed routing rules, observability, and repeatable load scenarios.

KOK project overview from the Notion brochure.
KOK project overview from the Notion brochure.

One front door for separate services

Spring Cloud Gateway gives the frontend a stable entry point while Eureka tracks service instances. Reservations, waitlists, and user management can keep their own rules and storage. I updated the public GET matching for paths with wildcards and added allowlist coverage. The gateway also strips incoming identity headers and forwards claims-derived identity after successful verification.

Turning performance expectations into checks

I enabled Prometheus metrics for the gateway and user service and added k6 scenarios for both. The protected-route scenario makes two expectations explicit: requests should meet the p95 latency budget and the error rate should stay below the threshold. These values are acceptance criteria for the scenario, rather than measured results.

JavaScript
    thresholds: {
        http_req_duration: ['p(95)<300'],
        http_req_failed: ['rate<0.01'],
    },

Team implementation: coordinating reservation capacity

The team used a Redisson lock per slot and reread the slot after acquiring the lock. The service subtracts the requested party size and restores it if the request would overbook. A separate idempotency lock handles duplicate submissions. Kafka events and a transactional outbox carry changes to other services once application state commits.

Java
            RAtomicLong capacityKey = redissonClient.getAtomicLong(SLOT_CAPACITY_KEY + request.getSlotId());
            long remaining = capacityKey.addAndGet(-request.getReservationSize());

            if (remaining < 0) {
                capacityKey.addAndGet(request.getReservationSize());
                throw new BaseException(ReservationErrorCode.SLOT_CAPACITY_EXCEEDED);
            }

What I learned

A useful deployment check should tell the team where to start looking. Gateway metrics, protected-route scenarios, and service boundaries made it easier to frame the question before opening individual service logs.

Related articles

Implementing JWT Authentication in a Spring Cloud MSA

Traffic Peak and MSA: Backend Design