Dev.to WebDev πŸ›  Dev πŸ‘ 0 πŸ“– 2 min read

Your billing remote is down. Can customers still use their account?

Imagine it's Monday morning and the invoices panel is timing out. A customer came to the account page to change their email. Can they still do it? And can someone who came to download an invoice tell whether their invoic

Your billing remote is down. Can customers still use their account?

Imagine it's Monday morning and the invoices panel is timing out. A customer came to the account page to change their email. Can they still do it? And can someone who came to download an invoice tell whether their invoice history is empty or temporarily unavailable?

That's the test I'd run before giving billing its own frontend deployment.

If a remote responds, the Next.js page shows live remote UI. If the remote times out or fails, the page shows a fallback for that panel.

Decide what the account page owns

I'd keep profile settings, account navigation, and sign-in in the Next.js host. If the billing team owns invoice data and wants to deploy its UI independently, I'd use a next-federation island for the invoice history. The billing remote fetches its own data and renders React Server Components on its server. The host embeds the rendered result.

The host still decides what the page can do when that result doesn't arrive. β€œNo invoices yet” tells the customer something about their account. β€œInvoices are temporarily unavailable” tells them when the panel failed. I'd give the panel both states and see how they look before moving it out of the host. Island guide

Run the outage drill locally

You can rehearse this without a billing service. The repo's advanced example gives you a Next.js storefront and a separately running account remote. After installing and building the workspace, run pnpm examples:platform and open http://localhost:13410/store/en/account.

  1. Sign in with the demo flow, and verify that Profile and Orders load.
  2. Open How is this page built? to see which areas come from the account remote.
  3. In a local or staging copy, make the account remote unreachable and start with fresh host state so cached successful content doesn't hide the failure. Reopen the page with the same demo flow. Check which parts still render and try the host navigation.
  4. Restore the remote and check that a fresh request can load the panels again.

The demo's Profile and Orders panels use blocking rendering. For an optional invoices panel, I'd also try a streaming island and compare when the host shell becomes usable. Measure it with the remote slow as well as unavailable. A slow dependency can be the more interesting failure. Advanced example walkthrough Β· App Router guide

If you run the drill, I'd like to hear which action your customers still need to complete during a billing outage. That's the action I'd test before releasing the remote. GitHub repository

πŸ“° Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.