MyPhotoAI · pSEO case study

When edge rendering helps a pSEO surface, and when it costs you

Edge rendering moves Next.js page rendering from a central origin to a CDN-adjacent worker. For a pure pSEO surface this is usually unnecessary; the static HTML cached at the edge already serves below twenty milliseconds. Edge rendering becomes interesting when leaves are dynamically personalized: by locale, by user segment, by experiment cohort. This leaf documents when we have shipped edge rendering on a pSEO surface and the specific cost-benefit math.

By AlkenaCode engineering team

We ship programmatic SEO surfaces, AI-driven receptionists, and case-study sites for Kenyan SMEs and overseas clients. Every claim on this page traces back to shipping work, not speculation. The audit tool on /audit is the same software we use to evaluate prospective engagements.

Authors of the myphotoai.alkenacode.dev pSEO surface itself. Source code is open at github.com/Kiragu-Maina/alkenacode-family. Production deployments include agents.alkenacode.dev and home.alkenacode.dev.

Last updated:

We have shipped both static-at-edge (this surface) and edge-rendered (the Kenyan SaaS engagement referenced in section two). The latency numbers come from production traces on both deployments.

When edge rendering helps a pSEO surface, and when it costs you

When static at the edge beats edge rendering

On this surface every leaf is identical for every visitor. Cloudflare cached HTML serves at the edge in twenty to thirty milliseconds globally. An edge-rendered version that recomputes the page from a slug manifest would add ten to forty milliseconds of compute per request and earn nothing in return; the output is byte-identical. The Lighthouse SEO and Core Web Vitals scores on this surface are 98 to 100 because the static-at-edge approach hits both LCP and TTFB targets without effort. For a surface with no personalization, do not enable edge rendering.

When edge rendering wins: locale and segment

If your leaves are personalized by locale (currency, language, regulatory disclaimer) edge rendering lets you serve the right variant from the request's geography without a redirect. On a separate engagement we ship a Kenyan SaaS surface where the currency displayed switches between KES and USD based on the Cloudflare CF-IPCountry header; the variant is computed at the edge in roughly five milliseconds. The static-cache approach would have required a redirect chain (origin to /locale-aware/ to final URL) adding two hundred milliseconds to first paint.

The cold-start trade-off

Edge workers have per-region cold-starts; the first request to a region after idle pays a fifty to one-hundred-fifty millisecond startup cost. On a low-traffic surface with global distribution, this cost is paid more often than on a high-traffic centralized surface. The math: if your surface sees fewer than ten thousand requests per region per day, the cold-start tax averages over more requests than the latency benefit; static-at-edge is better. Above ten thousand requests per region per day, the worker stays warm and the cold-start tax disappears. We have not enabled edge rendering on this surface for exactly this reason.

src/app/p/[slug]/page.tsxtsx
import { SLUGS } from "../../../../content/slugs";

export const dynamicParams = false;

export function generateStaticParams() {
  return SLUGS.map((s) => ({ slug: s.slug }));
}

export default function LeafPage({ params }: { params: { slug: string } }) {
  const leaf = SLUGS.find((s) => s.slug === params.slug);
  if (!leaf) notFound();
  // ... render the leaf
}
The leaf route's generateStaticParams reads the manifest at build time and tells Next.js which slugs to emit as static HTML.

Sources

Every claim on this page traces back to one of the verifiable sources below. Citations are publisher-stable; we avoid blog posts and other URLs that may not survive a year.

  1. Next.js docs: App Router (Next.js)
  2. Next.js docs: output option (standalone, export) (Next.js)
  3. Next.js docs: incremental static regeneration (Next.js)
  4. MDN: HTTP caching (MDN)
  5. MDN: Cache-Control header (MDN)
  6. Cloudflare docs: how the cache works (Cloudflare)
  7. web.dev: Largest Contentful Paint (LCP) (web.dev)
  8. web.dev: Interaction to Next Paint (INP) (web.dev)
  9. web.dev: Cumulative Layout Shift (CLS) (web.dev)
  10. Google: page experience signals (Google Search Central)
Free site auditor

See how the pattern applies to your site

The auditor uses the same evidence bundle described above (robots, sitemap, page samples) and returns a structured opinion. No signup, no email required to see results.