SShortSingh.
Back to feed

Offloading Image Optimization from Next.js SSR to Cloudflare Edge for High-Traffic Sales

0
·2 views

During high-traffic events such as Black Friday, the Next.js /_next/image endpoint can become a CPU and memory bottleneck, since libvips processing of resizing and format conversion can drive Node.js pods to 100% CPU and trigger Kubernetes OOMKills. The article argues that handling heavy binary transformations inside the SSR runtime is an architectural anti-pattern. It proposes moving image transformation to Cloudflare Images and Cloudflare Image Resizing at the Anycast edge, so the application server only generates HTML. Implementing a custom Next.js loader translates Next's width and quality parameters into Cloudflare's transformation syntax. The approach aims to preserve Time to First Byte at e-commerce scale with millions of SKUs.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Self-improving agent's apparent gains were noise; author publishes null result

The author built ALMA, a governance layer for self-improving agents that proposes changes to itself under a frozen validator and pre-registered experiments. Re-measuring with larger selection panels and a recalibrated threshold showed the apparent improvements were selected noise, reversing 7 of 7 times on held-out data. Re-testing all 58 in-scope configurations found none beat the base, so the meta-loop adopted zero changes and the search was closed. The author chose to publish this as a certified null result rather than keep tuning, and plans future reviewer runs on ReviewBench with a manifest for each run to prevent cherry-picked scores.

0
ProgrammingDEV Community ·

Team splits AI coding work across four models and logs what each catches

A developer team stopped relying on a single model after its subscriptions kept hitting usage limits and the model was checking its own work. Claude now plans and reviews, Grok attacks Claude's drafts, Codex builds larger components, and a router called Tīrtha handles routine building. A ledger from Sep 25 to Oct 17 shows Grok raised 519 findings, of which 309 held up on manual re-check and 207 were absent from Claude's draft, while Codex raised 50 findings with 39 holding up. The team reports Grok reviews cost a median of about two cents each, though Codex runs are token-heavy and hit usage limits seven times in the same period. The authors acknowledge that Tīrtha's track record is only a few weeks old and that the ledger was partly graded by Claude itself, so the benefits remain unproven.

0
ProgrammingDEV Community ·

Detecting Website Tech Stacks for 500 Sites in One Run for About $2.50

A developer describes using an Apify actor called Website Tech Stack Detector to identify the technologies behind hundreds of websites, such as CMS platforms, ecommerce systems, and analytics tools. The tool sends one plain HTTP request per URL without running a browser or JavaScript, checking response headers, script sources, HTML markers, and cookie names. It recognises about 60 technologies and includes the evidence for each detection, and it respects robots.txt by default. Pricing is $0.005 per successfully fetched URL, so a 500-site batch costs roughly $2.50, with failed requests not charged. The author notes the approach is coarse, since missing detections do not prove a technology is absent and client-side rendered tools can be missed.

0
ProgrammingDEV Community ·

MedReachAI Team Closes Usability Testing and Readies Production Polish

The MedReachAI capstone team has closed its usability testing window after collecting testing kits and completing think-aloud sessions. They are now compiling survey results and synthesizing feedback into a UX research report to guide final interface changes. On the backend, the team fixed a Firebase Auth emulator issue, connected the FastAPI server to the React frontend, and plans to merge NLP feature branches after a final code review. Engineers are also removing placeholder data, wiring up unfinished buttons, and overhauling authentication state with dynamic components and logout functionality. The team says these updates aim to produce a production-ready application before graduation next month.