<S/>
Sakhawat Hossain Backend & AWS Engineer
Systems Architecture • Technical Notes • Deep-Dives

The Engineering Log

Architectural case studies, battle-tested performance tunings, and real-world backend notes from shipping production systems.

Database Tuning • February 2026 • 6 min read

Slashing MySQL p95 Query Latency from 850ms to 32ms in High-Throughput Laravel

When an e-commerce dashboard begins serving 10,000+ daily orders, typical ORM queries with nested relationships degrade quickly into 800ms+ CPU bottlenecks. Here is how we profiled queries with EXPLAIN ANALYZE, built composite indexes respecting the leftmost prefix rule, and layered Redis tag-based invalidation.

mysql-benchmark.sql
benchmark
// Benchmark Impact:
Before: Full Table Scan (~420,000 rows) | Response: 852ms | DB CPU: 78%
After: Ref index (tenant_id, status, created_at) + Redis Cache Tag | Response: 31ms | DB CPU: 8%
#MySQL #Indexing #Redis #Laravel
Need this optimization? See Services
AWS & DevOps • January 2026 • 5 min read

Zero-Secret AWS Deployments with GitHub Actions & OpenID Connect (OIDC)

Storing long-lived AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY inside GitHub repository secrets is a major security vulnerability. By configuring AWS IAM Identity Providers with GitHub's OIDC token issuer, our workflows request short-lived (15-minute) STS credentials tied strictly to the repository and branch name.

aws-oidc-flow.yml
security flow
// GitHub Actions Security Flow:
GitHub Runner → OIDC JWT Token → AWS STS AssumeRoleWithWebIdentity → Temporary Credentials → EC2 Zero-Downtime Deploy
#AWS #GitHubActions #Security #OIDC
Automate your CI/CD
Architecture • November 2025 • 7 min read

Designing Modular Monoliths in Laravel: High Growth Without Microservices Complexity

Premature microservices often kill early-stage velocity with network latency, distributed transactions, and deployment overhead. By organizing Laravel applications into self-contained Domain Modules (e.g. app/Modules/Billing, app/Modules/Identity) with strict internal contracts, you get all the benefits of clean code boundaries while maintaining single-deploy simplicity.

modular-architecture.php
principles
// Architecture Principles:
1. Domain Modules own their migrations, routes, DTOs, and event listeners.
2. Cross-domain interactions occur strictly via Interfaces & Event Dispatches (no cross-module direct model coupling).
#ModularLaravel #DDD #CleanArchitecture
Explore Production Case Studies
Concurrency • September 2025 • 5 min read

Preventing Concurrency Race Conditions and Double-Spending with Redis Atomic Locks

When multiple webhook calls or simultaneous user clicks hit an account balance or inventory check at the same millisecond, simple database checks fail due to read-uncommitted race conditions. We implement Redis atomic locks (Cache::lock()) paired with database row-level locking (SELECT ... FOR UPDATE) and idempotent transaction tokens to guarantee 100% financial correctness.

redis-atomic-lock.php
lock pattern
// Implementation Pattern:
$lock = Cache::lock("wallet:{$userId}", 10);
if ($lock->get()) { DB::transaction(fn() => ...); $lock->release(); }
#RedisLocks #Transactions #Webhooks #Concurrency
Build High-Concurrency Systems

Have a Complex Architecture Question?

Whether you want to discuss database tuning, AWS infrastructure, or system design for your product, let's connect.