← Daniel Bloom/03 · Performance Optimization

One stack: 80% faster. CPU 74%. DB use 64%.

A walkthrough of a full-stack performance program: the bottlenecks I found, what the fix looked like, and the impact on users and infrastructure.

The headline

0%

Avg. latency reduction on key shop page

0

Discrete bottlenecks identified and fixed

0%

Server CPU reduction

01 · OPcache

Fix OPcache in Prod

Before

The site was sluggish. Every request paid the cost loading code, adding 100s of milliseconds.

After

Enabling OPcache with the right settings produced a single sharp inflection point — P95 dropped by over 50% within one deploy, CPU plunged.

−50%P95 on PHP entry points
Fig. 01Datadog · Lumen production
Datadog latency dashboard showing the OPcache deploy inflection

02 · Redis

Shift load from db to Redis

Before

Key endpoints were making dozens of db reads on every request, putting strain on the db and adding tens of milliseconds to latency.

After

Using Datadog we identified and expensive and duplicative db reads and moved them to a Redis cache, improving latency and db stability

−55msavg endpoint query latency

03 · Component cache

Aggressively cache components

Before

A number of resource-intensive SSR components were slowing the site.

After

Aggressively cached in Redis all components that did not need to be dynamically generated for each user.

-85%p50 shop page latency
Fig. 03Datadog · shop page · 273k requests
Datadog requests and latency dashboard for the shop page, 273k requests

04 · CDN

Shift load from servers to CDN

Before

A number of static assets were being served from the servers, increasing the load and the number of Kubernetes resources required.

After

Updated CI/CD pipelines so that static assets were sent to S3 and served from the Cloudfront CDN. This dramatically reduced page load time and cut our AWS compute costs.

-110msReduction in DOM content load time

05 · API concurrency

Parallelized the Shopify calls

Before

The shop page made multiple real-time calls to the Shopify API per request — one after another. Server response time grew with every hop, and Shopify itself isn't fast.

After

Parallelized the real-time Shopify calls and layered caching in front. In the scatter, the dense band of sub-200ms responses near the x-axis is the cached path — those requests skip Shopify entirely.

−43%shop page server response time
Fig. 05Datadog · shop page · response time scatter
Datadog duration scatter showing concurrent API call wall time

06 · Queues

Shift writes to asynchronous queues

Before

Some user flows, such as interactive quizzes used for lead capture, were slowed by back end writes to different internal systems.

After

Moved write data onto async queues with ephemeral idempotent workers. Request duration cliff-dropped overnight; failure modes became visible instead of silent.

−96%write-action duration

Cumulative impact

Six fixes, compounding.

Each phase landed independently, but the wins stacked. Better performance led to better SEO and user conversion. Stability and cost savings on infrastructure were a bonus.