Parking management system
CLIENT
Parking
SERVICES
Backend Development
TECHNOLOGIES
- .NET
- SQL Server,
- MongoDB
- Azure Cloud
Case studies
Other usecasesDescription
A transport client in Norway operating multi-site parking systems faced scaling limitations, unstable operations, and rising cloud spend. As the business prepared for regional expansion, we had to stabilize production while reducing costs and addressing technical debt.


Key Achievements:
- Performance & Stability: Reduced MongoDB long-running queries from 15 minutes to 10 seconds; improved fast-path reads from ~400ms to ~250ms
- Reliability: Brought production down to ~3 errors/month (from 500+ daily errors previously observed)
- Cost Optimization: Cut Azure SQL and MongoDB Cloud costs by optimizing queries and right-sizing compute
- Delivery: Launched a new microservice for a separate client segment, supporting multi-country rollout
- Dev Efficiency: Unified branching for PROD/TEST, fixed integration tests, and stabilized CI/CD
Original context
The legacy system accumulated issues that directly impacted reliability and cost:
- Concurrency: Missing database transactions led to invalid state and frequent exceptions
- Monitoring: High error volume and uncorrelated logs made debugging slow and reactive
- Operational Costs: Inefficient SQL/MongoDB usage inflated Azure and MongoDB Cloud spend
- Technical Debt:
- 700+ static references made testing and environment switching hard
- 264 test suites incomplete or failing
- Manual migrations and inconsistent integration tests
- Development Inefficiencies:
- Separate PROD/DEV branches requiring manual rebases
- Incomplete pipelines slowed delivery and increased risk
The rewriting problems
While not a greenfield rewrite, the live system’s state created production risk and slowed delivery. Query performance and logging noise masked real issues and inflated spend.

| Metric | Before | After |
|---|---|---|
| Longest Query Duration | 15 minutes | 10 seconds |
| Average Fastest Query | ~400ms | ~250ms |

Further bottlenecks were identified but deferred due to priorities.
Investigation & Discovery
To gain control in production without halting delivery, we:
- Introduced correlation context to stitch logs across operations and services
- Collected targeted metrics and query plans for the top 15 SQL queries
- Profiled MongoDB slow queries and access patterns
- Isolated integration scenarios with Testcontainers to reproduce issues deterministically
- Established end-to-end checks for regression detection
Solution Approach
We stabilized first, then optimized iteratively with minimal risk:
- Enhanced Monitoring
- Added correlation IDs to enable end-to-end traceability and reduce MTTR
- Azure SQL Optimization
- Refactored hot paths and added minimal indexes guided by execution plans to balance I/O vs CPU
- MongoDB Query Improvements
- Tuned indexes and query shapes, cutting worst cases from minutes to seconds and improving p50 read latency
- Branching & Delivery
- Adopted a single branch for PROD/TEST to remove manual rebases and align environments
- Repaired integration tests and completed CI/CD pipelines to reduce regressions
New developments
To unlock a new revenue stream, we built a dedicated microservice for rental vehicle data ingestion, regulatory compliance, client-facing API documentation, invoicing, and isolated infrastructure per market.

The average query time was ~80ms; end-to-end latency was higher due to cross-cloud hosting (Azure app, Google-hosted DB) imposed by external constraints.
Architectural Approach
- Domain-Driven Design for country-specific parking rules
- CQRS to separate reads/writes and enable scale and caching
- Test-Driven Development to ensure correctness despite tight timelines
- MongoDB as the primary data store for flexible, high-throughput workloads
The microservice comprised:
- Public Client API for data access
- Private Administration API for internal operations
- Background Jobs for ingestion and invoice generation
Design Considerations
- API Security: Azure Identity for authN/Z
- RESTful API Design:
- Consistent HTTP responses (200, 204, 401, 403, 422)
- Tests enforce behavior; documentation reflects reality
- API Versioning for backward compatibility
Testing strategy
- Unit Testing
- Covered business requirements; mutation testing via Stryker.NET around critical flows (e.g., invoicing)
- Isolated Integration Tests
- Testcontainers for MongoDB to validate concurrency and data interactions
- Live Integration Tests
- Read-only queries against live to detect regressions proactively
Technology Stack Used
- .NET, Azure App Service
- Azure SQL Server, MongoDB (Cloud)
- Azure Identity
- Testcontainers, Stryker.NET
- GitHub/Azure DevOps CI/CD and unified branching
Conclusions
Multi-country deployments are live with country-specific rules. Peak throughput reached ~20,000 requests/sec. Reliability improved to ~3 errors/month. The platform now runs cost-effectively on Azure App Service with MongoDB Cloud (M10), delivering new revenue while keeping operational costs under control.
After 1 year of development, the system is already bringing money to the client, while keeps the operational costs down. Currently it runs on Azure App Service with MongoDb Cloud Option M10 - the most cost effective plan.