High-Performance Examination API
A production-grade .NET 9 Web API built to manage high-traffic online examinations. The system prioritizes data integrity and low-latency performance by offloading active exam sessions to a distributed cache and securing media assets via cloud-native storage.
Scaling Write-Heavy Sessions
To prevent SQL Server from being overwhelmed during live exams, I architected a Redis-First state management system.
Redis Hash Optimization
By storing exam attempts as Redis Hashes, the API performs surgical updates on individual question fields rather than re-serializing the entire session object. This reduces network payload size and ensures constant-time O(1) performance even as question counts scale.
Server-Side Time Integrity
To prevent cheating, the system ignores client-side timestamps. Every action is validated against DateTime.UtcNow on the server. The start time, elapsed duration, and submission window are strictly enforced backend-side, rendering frontend timer manipulation impossible.

Engineering Philosophy
Vertical Slice Architecture
I moved away from traditional layered architecture to Vertical Slices. Co-locating the DTOs, Handlers, and logic for specific features like "SubmitAttempt" drastically improved developer velocity and ensured that changes to one feature never inadvertently break another.
Secure Cloud Storage
Private exam assets are managed via AWS S3. Access is restricted through an abstracted service that generates Time-Limited Pre-signed URLs, ensuring that media is only accessible to authorized students for the duration of the exam.
