This design implements Azure Event Hubs for high-scale data ingestion (Kafka style).
Topology: The Event Hub Namespace is deployed in the Spoke VNet (via Private Endpoint). It peers to the Hub for secure access.
+--------------+ +--------------------------+ +--------------+
| Producer | | HUB VNet | | SPOKE VNet |
| (IoT Dev) | | (DNS Resolver) | | (Consumer) |
+------+-------+ +------------+-------------+ +------+-------+
| | |
v | (Peering) |
+------+-------+ v v
| VPN Gateway | +------------+-------------+ +------+-------+
| (Ingress) |---------->| Private DNS Zone |<----------| Function |
+--------------+ | (privatelink.servicebus) | | (Reader) |
+--------------------------+ +------+-------+
|
v
+--------------+
| Event Hub |
| (Namespace) |
+--------------+
PRIMARY REGION (East US)
+-----------------------------------------------------------------------+
| HUB VNet: vnet-hub (10.0.0.0/16) |
| +-----------------------+ |
| | Private DNS Zone | |
| +-----------|-----------+ |
| | |
| v (Peering) |
+---------------|-------------------------------------------------------+
|
+---------------|-------------------------------------------------------+
| SPOKE VNet: vnet-data-spoke (10.1.0.0/16) |
| +-----------------------+ +-----------------------+ |
| | Subnet: Workload | | Subnet: PrivateLink | |
| | [Function App] |------>| [Private Endpoint] | |
| | | | (10.1.1.5) | |
| +-----------------------+ +-----------|-----------+ |
+-----------------------------------------------|-----------------------+
|
v
+-----------------------+
| Event Hub Namespace |
| (Primary) |
+-----------------------+
|
| (Metadata Sync)
v
SECONDARY REGION (West US)
+-----------------------------------------------------------------------+
| DR SPOKE VNet |
| +-----------------------+ |
| | Event Hub Namespace | |
| | (Secondary) | |
| +-----------------------+ |
+-----------------------------------------------------------------------+
* Pair the East Namespace with West Namespace.
* Use the Alias Connection String in your app.
* If East fails, Microsoft (or you) initiates failover. The Alias now points to West.
* *Note: Data is NOT replicated. Only metadata (Event Hub names, Consumer Groups). You lose in-flight data.*
1. Producer: Sends event to alias.servicebus.windows.net.
2. DNS: Resolves to East US Private IP.
3. Ingest: Event Hub accepts message.
4. Capture: Saves copy to Blob Storage.
5. Consumer: Function App reads message.
1. Search: "Event Hubs" -> + Create.
2. Resource Group: rg-data-spoke.
3. Namespace name: evh-ns-corp-[uniqueid].
4. Location: East US.
5. Pricing tier: Standard (Required for Private Link & Capture).
6. Throughput Units: 1.
7. Create.
1. Go to the new Namespace -> Event Hubs (Left Menu) -> + Event Hub.
2. Name: telemetry.
3. Partition count: 2 (Default) or 4.
4. Message retention: 1 day (Default).
5. Capture: Off (Enable later if needed).
6. Create.
1. Go to Namespace -> Geo-recovery.
2. Initiate pairing.
3. Subscription: Select yours.
4. Secondary namespace:
* Select Create new.
* Name: evh-ns-corp-dr-[uniqueid].
* Location: West US.
5. Alias: evh-alias-corp.
6. Create.
* *Note: You now use the Alias connection string in your apps.*
1. Go to the Primary Namespace (evh-ns-corp...).
2. Networking.
3. Public network access: Select Disabled.
4. Private endpoint connections -> + Private endpoint.
5. Name: pe-evh.
6. Resource Group: rg-data-spoke.
7. Target sub-resource: namespace.
8. Virtual Network: vnet-data-spoke.
9. Subnet: snet-privatelink.
10. Integrate with private DNS zone: Yes.
* Zone: privatelink.servicebus.windows.net.
11. Create.
1. Login to a VM in the Spoke.
2. Nslookup: nslookup evh-ns-corp-[uniqueid].servicebus.windows.net.
* Result should be 10.1.x.x (Private IP).
3. Send Event:
* Go to Portal -> Event Hub telemetry -> Data Explorer (Preview).
* Send events.
* Type {"test": "message"} -> Send.
* View events in the Events tab.