Sitemap
Zhangshuang

Zhangshuang

Global AI Platform: One Codebase, Three Keys, Each Law-Abiding

3 min readOct 26, 2025

1. Background Sketch

The same AI platform must land in the EU, US and APAC simultaneously — not a tech problem, but a “legal jigsaw”: GDPR wants personal data to stay local, CCPA stresses consumer deletion rights, PDPA has detailed cross-border encryption rules. Worse, all regions connect to identical tools (Gmail, Salesforce, Snowflake) yet keys must “go home” separately. Peta uses “regional shards + local gateways” to give one codebase three sets of local keys, each law-abiding and isolated.

2. One Cloud, Three Faces

We run regional gateways in Virginia, Frankfurt and Singapore. They still answer to *.bridge.peta.io, but DNS Geo splits them internally:

  • EU node accepts only European clients, writes to GDPR log buckets, auto-erases after 30 days
  • US node follows CCPA — one-click consumer delete and data portability
  • APAC node meets PDPA cross-border encryption — AES-256 generated locally, cloud keeps only fragments
    One Helm chart deployed three times with different tags — ops complexity unchanged.

3. Keys Born Locally, Never Exported

Root secrets follow “generate on site, never leave” doctrine:

  • European office plugs USB token, clicks once, root shards born; paper backup locked in Luxembourg safe
  • NYC HQ uses HSM for another root set; fragments scattered across three bank safes
  • Singapore DC uses TPM for a third set; some shards written to smart-cards held by three people
    The three shard sets are unrelated; even if one region faces a court warrant, it cannot reconstruct keys for the others.

4. Cross-Region Calls: Model in A, Tool in B, What Now?

Sales VP sits in New York but customer emails live in Frankfurt Gmail. Peta’s “cross-region route” puts a data-location tag inside the token:

  • Tag = EU → request routed to EU gateway, local proxy calls European Gmail, result returns via same pipe, never touches Virginia
  • Tag = Global → exits nearest PoP, but tool side must still obey local shard policy
    Thus “model crosses border, data does not.”

5. Consumer One-Click Delete: From Button to Shards

Get Zhangshuang’s stories in your inbox

Join Medium for free to get updates from this writer.

CCPA demands “user clicks → deleted.” Peta console offers “Consumer Erase”:

  • User clicks delete → each regional gateway receives event → local proxy destroys all derived tokens → append log “deleted”
  • Within 48 h cascade erase S3 objects, DB rows, vector indexes
  • Compliance PDF auto-emailed to consumer, full audit trail.

6. Compliance Dashboard: Legal Can Read It

  • Left map live-shows “EU personal data traffic” — flashes red if threshold exceeded
  • Right pie displays “consumer delete requests” completion rate this month — < 95 % auto-emails DPO
  • Bottom timeline aligns GDPR 72 h, CCPA 30 day, PDPA 24 h breach notice countdown — color changes when deadline approaches

7. Drills: Single Region Down, Global Still Up

US-East node offline due to under-sea cable cut:

  • DNS automatically routes new long connections to Canada backup POP
  • EU and APAC nodes feel zero impact, continue with local keys
  • Affected US tokens reconnect within 5 s, KPIs stay flat
    Because shards are independent, loss of any region does not invalidate keys elsewhere.

8. Cost & ROI

  • Three regional gateways ≈ three Helm releases, no extra headcount
  • Compliance fines = 0: client avoided GDPR 4 % revenue fine last year
  • Market expansion speed ×2: legal no longer argue “where are the keys,” launch cycle shortened from 6 months to 6 weeks

9. FAQ

Q: Do we regenerate all shards when adding a new region?
A: Yes. That’s the zero-trust cost: every new legal domain must birth its own keys, never recycle old shards.

Q: How does cross-border social recovery work?
A: Pre-list backup contacts across regions and scatter shards; restoration requires at least k contacts from different jurisdictions online simultaneously, preventing a single-country court from forced seizure.

10. Wrap-Up

When data sovereignty becomes a trade barrier, “one codebase” must learn “multiple keys” to tour the world. Peta turns legal differences into programmable fields with shard math: models flow freely, keys each go home. Next article we’ll step into the ecosystem: how Peta co-evolves with the open-source community to give zero-plaintext back to more MCP servers — stay tuned.

--

--