All writing

Dual-Track Engineering: How MENA Teams Build for Two Markets at Once

Most engineering teams treat regulatory compliance as a feature sprint. In MENA, it's a parallel track that runs for the entire product lifecycle — and if you wire the architecture wrong at the start, you pay for it in re-platforming costs eighteen months later when a regulator asks for data residency you didn't plan for.

I've built in this market long enough to know: the teams that scale here aren't the ones with the best engineers. They're the ones who understood early that building for the Gulf and building for global simultaneously is a different engineering discipline entirely — not harder, but structurally different in ways that most imported playbooks miss.

The Core Tension: Residency vs. Reach

Every MENA product that wants to be more than a local tool runs into the same architectural fork. On one side: UAE data residency requirements, DIFC and ADGM regulatory perimeters, Saudi PDPL constraints, and in fintech specifically, CBUAE mandates that make AWS us-east-1 a non-starter. On the other side: your global customers, your investors, your GitHub Actions runners, your Datadog dashboards — all sitting in regions that don't satisfy those requirements.

The wrong instinct is to build the product once and retrofit compliance later. The right move is to treat the data plane and the control plane as separate from day one.

Data plane: where customer data lives, gets processed, and gets stored. This is where residency rules bite. For UAE production, that means me-south-1 (Bahrain) or me-central-1 (UAE) on AWS, or UAE North on Azure. Your LLM inference calls, if they touch PII, either need to route through an Azure OpenAI instance deployed in UAE, a self-hosted model in your own compute, or go through a data-scrubbing proxy before they leave the region.

Control plane: your CI/CD, your observability stack, your developer tooling, your cost dashboards. This can live globally. Regulators care about customer data, not your Terraform state.

Separating these two planes lets you move fast on tooling and infrastructure without touching anything that creates compliance surface area. Conflate them and every infrastructure change becomes a compliance review.

The Multilingual Stack Problem Nobody Talks About

Arabic isn't just a locale setting. Right-to-left rendering, bidirectional text in mixed Arabic-English content, and Arabic NLP behavior in LLMs are all distinct engineering problems. Teams that treat all three as one ticket end up with a UI that renders correctly but an AI pipeline that answers Arabic queries in degraded quality — because they never tested with a realistic Arabic prompt distribution.

For AI products specifically, the practical checklist is:

  • Embedding models: most general-purpose embeddings underperform on Arabic. Test retrieval quality explicitly with Arabic queries against Arabic documents. text-embedding-3-large performs noticeably better than ada-002 on Arabic, but neither matches a purpose-built multilingual model like multilingual-e5-large on mixed-script corpora.
  • Tokenization cost: Arabic text tokenizes at roughly 2–4x the token count of equivalent English content in most LLMs. Your cost models built on English benchmarks are wrong for Arabic-heavy workloads. Budget accordingly.
  • LLM instruction following: models instructed in English to respond in Arabic sometimes drift back to English mid-response under load or when the system prompt is long. Pin the language instruction close to the query, not buried in a 2,000-token system prompt.
  • RTL in React/Next.js: use dir="rtl" at the document level and dir="auto" at the component level for mixed content. Don't use CSS transforms to fake RTL — it breaks text selection and accessibility.

The teams that get this right treat Arabic and English as two separate product experiences that happen to share the same data model, not one product with a locale toggle.

The Approval Layer Is Your Actual Bottleneck

Here's the MENA-specific engineering leadership insight that no Silicon Valley playbook captures: your deployment velocity isn't limited by your CI pipeline. It's limited by the number of humans who must approve a change before it ships.

In regulated MENA sectors — fintech, healthtech, govtech — a single feature touching payment flows or patient data can require sign-off from a compliance officer, a data protection officer, a business owner, and sometimes an external auditor. Each of these has a response time measured in days, not minutes. The engineering work takes hours. The approval chain takes weeks.

The teams that ship fastest in this environment have internalized one rule: make the approval surface area as small as possible, and make each approval reusable.

Practically, this means:

  1. Pre-approved change categories. Work with your compliance team once to define a taxonomy of changes that don't require individual approval — UI changes that don't touch data flows, non-PII configuration changes, internal tooling updates. Document it. Enforce it via your change management process. Now a large share of your deploys bypass the queue.

  2. Approval-as-code. Store the compliance decision alongside the code. If a feature was approved to handle PII data in region X, that approval lives in the repo next to the feature flag that controls it. When someone asks "was this reviewed?", the answer is a git log away, not a Slack thread.

  3. Feature flags as the compliance handshake. A regulator doesn't care when you merged code; they care when it was active for users. Merging behind a flag decouples your engineering timeline from your compliance timeline. The code can be in production, reviewed, tested — and only flipped on after sign-off. This is the real reason feature flags matter in LLM changes: in MENA, they're not just a rollback mechanism, they're a compliance instrument.

Hiring for MENA Is a Different Signal Set

The candidates who perform best in MENA engineering teams share a consistent pattern: they're comfortable with ambiguity in requirements but precise in implementation. This sounds like every job description ever written, but the MENA version is specific.

Ambiguity in requirements here often isn't product ambiguity — it's regulatory ambiguity. A new PDPL clarification drops, and you need an engineer who can read a legal document, extract the technical implication, and implement a change without three rounds of "what exactly does this mean?" They don't need a law degree; they need the professional confidence to make a reasonable interpretation, document their reasoning, and ship.

Precision in implementation matters because integrations with regional banking rails, government identity systems (UAE Pass, Absher), and telecom APIs are often under-documented, slow to respond in support, and unforgiving of malformed requests. The engineer who reads the spec, writes an integration test that covers the edge cases the spec doesn't mention, and gets it right on the first submission to the partner's UAT environment saves you weeks. The engineer who iterates loosely costs you months of partner back-and-forth.

When I interview for senior engineering roles in MENA, I weight two signals heavily:

  • How they've handled integrating with a system where the documentation was wrong or incomplete
  • Whether they've ever had to defend a technical decision to a non-technical regulator or compliance function

Neither of these shows up on a CV. Both predict performance in this market.

The Dual-Track Architecture Decision Table

ScenarioWrong defaultRight default
LLM inference with PIIRoute to global APIAzure OpenAI UAE / scrubbing proxy
Observability stackDuplicate per regionSingle global control plane, regional data plane
Arabic supportLocale toggle on English UXSeparate UI component tree, separate prompt templates
Compliance approvalPer-change reviewPre-approved taxonomy + feature flags
Regional banking integrationIterate in prodFull UAT harness before first submission
Hiring for ambiguityCulture fit heuristicsConcrete scenarios from regulated integrations

What to Actually Do

  1. Audit your data plane vs. control plane split today. If you can't answer "which of my systems touch PII and in which region does that compute happen," you don't have a compliance strategy — you have a compliance risk.

  2. Run a tokenization cost model on your actual Arabic query distribution. Pull 500 real queries, measure average token count versus your English baseline, and reprice your LLM cost forecast. The number will surprise you.

  3. Map your approval chain for one recent feature. Count the humans, count the days. Then work with your compliance team to build the pre-approved change taxonomy. This is a one-time investment that pays out on every subsequent deploy.

  4. Add a compliance artifact to your feature flag standard. Every flag controlling a feature that touches regulated data should have a corresponding document: what was reviewed, by whom, on what date. Store it in the repo.

  5. Add one MENA-specific interview scenario to your senior engineering process. Describe a real (anonymized) situation where a regional API was under-documented and ask how they'd approach it. The quality of the answer tells you more than three LeetCode problems.

The teams winning in MENA aren't ignoring the constraints. They've built an architecture where the constraints don't slow down the parts that don't need to be slow.

Working on something like this? I take on a few fractional-CTO and AI engagements at a time.

The AI CTO playbook

Get my AI playbooks — straight to your inbox

Practical notes on shipping production AI, scaling teams, and the calls a CTO actually has to make. A few times a month. No spam, no fluff.