Integration Middleware Services (Cloud)
Problem
An organisation exchanging real-time data with several third-party systems, each run by another company with its own protocol, ends up with a mesh of point-to-point links and credentials. That traffic crosses the Public Internet (or a dedicated private link) to the cloud, so callers must authenticate at a WAF-protected edge and outbound calls must leave through a managed egress gateway with a static IP and an FQDN allow-list. Direct links are often not technically possible, couple the systems tightly, and leave nowhere for orchestration and transformation.
Solution
Build a cloud-native integration platform on managed middleware services, in a Public Subnet (Perimeter) or Private Subnet (Workloads) dedicated to integration. It carries real-time, asynchronous or synchronous exchanges between the external systems and provides message brokering, event streaming, data transformation, protocol adaptation and orchestration of complex integration flows.
Cloud Paradigm
- Event-Driven Architecture (EDA)
- Serverless Integration
- Asynchronous Messaging & Event Streaming
- API-Led Connectivity
- Hybrid Cloud Integration (for connections spanning different cloud environments or on-premises infrastructure)
Solution Flow
Inbound Data Flow (from External System A to Middleware):
- External System A: A third-party system sends a secure request or publishes an event (e.g., HTTPS, AMQP, MQTT, Kafka protocol) over the Public Internet or a dedicated private network link.
- Edge Protection (WAF) / Network Ingress: At the public-facing cloud edge, Edge Protection (WAF) checks for malicious signatures and enforces traffic policies. For message brokers, a dedicated network ingress component may handle client authentication (e.g., mTLS) and authorisation.
- API Gateway / Middleware Ingress: An API Gateway (synchronous APIs) or a message broker or event stream ingress authenticates the caller, terminates TLS and routes the traffic to the right middleware service or topic in a Private Subnet (Workloads).
- Middleware Service: The cloud-native integration service (e.g., a serverless function, containerised integration runtime or message broker) transforms, validates and enriches the data, then orchestrates the next step, such as publishing to an internal event stream or queuing for later processing.
Outbound Data Flow (from Middleware to External System B):
- Middleware Service: The integration service prepares to send the processed data to External System B, or invoke a service there: an API call, a message to a partner's queue, or an event publication.
- Managed NAT / Egress Gateway: The middleware service usually sits in a Private Subnet (Workloads) without direct Public Internet access, so outbound traffic goes through a Managed NAT / Egress Gateway, which enforces FQDN allow-listing, performs network address translation and provides a static egress IP.
- External System B: The target external system (e.g., a partner API, a messaging endpoint) receives the request or event from a secure, allow-listed cloud egress point.
When to Use
- You must integrate three or more external systems, and point-to-point connections would create an unmanageable mesh of coupling and credentials.
- Trading partners use different protocols (REST, SOAP, AMQP, MQTT, sFTP) or data formats (JSON, XML, CSV, proprietary) that need transformation and adaptation before exchange.
- Real-time or event-driven exchange needs message brokering, pub/sub or event streaming with delivery guarantees, not simple synchronous calls.
- Integration flows need orchestration, enrichment or fan-out logic that cannot live inside either endpoint system.
- External systems require a static, allow-listed egress IP and centralised authentication (mTLS, API keys) at a controlled perimeter.
When NOT to Use
- Only two stable systems exchange data with a fixed contract: a direct point-to-point link or a simple managed API connection is cheaper and simpler.
- Bulk, latency-tolerant transfers dominate; a scheduled batch/ETL or managed file-transfer pattern fits better than real-time middleware.
- The integration is purely internal, inside one trust boundary, where a service mesh or internal event bus avoids the perimeter overhead.
- Extreme low-latency or high-throughput streaming calls for a dedicated event-streaming platform tuned end to end, not a general-purpose integration runtime.
- The organisation lacks the operational maturity to run brokers, dead-letter queues and observability; a fully managed iPaaS may suit it better.
Trade-offs
- Loose coupling and centralised orchestration vs the middleware becoming a critical single point that must itself be highly available and multi-AZ.
- Protocol and format normalisation in one place vs the work of maintaining transformation logic as partner contracts change.
- Reliable delivery via queues, retries and idempotency vs added end-to-end latency and the complexity of dead-letter handling.
- Static allow-listed egress and enforced perimeter security vs the cost and configuration overhead of NAT/egress gateways, WAF and API gateway layers.
- Elastic scaling and observability across flows vs higher baseline spend and the distributed-tracing instrumentation needed to run it well.
Illustrative Scenario
A hypothetical scenario showing how the pattern applies. Not a client case study.
Take a hypothetical commercial property-and-casualty insurer that connects broker platforms, telematics providers and reinsurance partners, each of which uses a different protocol. Brokers submit quotes through HTTPS APIs, while telematics vendors stream vehicle events over MQTT and AMQP. Every connection first meets Edge Protection (WAF) and an API Gateway, which terminates TLS, authenticates the caller with mTLS and routes the traffic to a containerised integration runtime in a private subnet.
The runtime normalises proprietary XML and CSV submissions into a canonical policy schema, enriches them with risk-scoring lookups, and queues them with idempotency keys, backed by a dead-letter queue. The enriched risk packages then go out through a Managed NAT gateway, which presents a static, allow-listed egress IP to the reinsurer's endpoint. Distributed tracing covers every flow end to end. One observable, multi-AZ integration hub replaces what would otherwise be an unmanageable point-to-point mesh, and each partner deals with a single, controlled edge.
Additional Details
- Integration Patterns: The pattern supports request/response, publish/subscribe and event-driven integration styles.
- Middleware Components: Use managed cloud services for message queues (e.g., managed message queue services, RabbitMQ as a service), event streams (e.g., Kafka as a service, managed event streaming), serverless functions, and container orchestration platforms for custom integration runtimes.
- Data Transformation & Protocol Adaptation: The middleware handles diverse data formats (JSON, XML, CSV, proprietary formats) and protocols (REST, SOAP, AMQP, MQTT, sFTP) and converts between them so disparate systems can interoperate.
- Reliability & Idempotency: Build error handling, retries, dead-letter queues and idempotency into the middleware, so messages are delivered and duplicates are not processed.
- Observability: Collect logs, metrics (message rates, latency, error rates, throughput) and distributed traces (e.g., OpenTelemetry) across all middleware components and flows.
- Scalability & Resilience: Design middleware services for high availability and automatic scaling under fluctuating load, with multi-availability-zone deployment and disaster recovery.
Security Controls
- Perimeter Security: Inbound connections terminate at an Edge API Gateway or a dedicated network ingress component in a Public Subnet (Perimeter), behind Edge Protection (WAF). For message broker endpoints, configure Edge Protection (WAF) to allow-list client IP addresses and require client certificates.
- Transport Security: Enforce TLS 1.2 or higher between external systems and the integration platform, and between middleware components and backend workloads.
- Authentication & Authorisation:
- Authenticate system-to-system (B2B) callers with Mutual TLS (mTLS), or OAuth 2.0 (Client Credentials Grant) where it fits.
- Use access control lists (ACLs) or role-based access control (RBAC) in the middleware layer to authorise access to specific integration flows, topics or queues.
- Note: API keys identify callers or set rate limits; never use them as the only authentication.
- Traffic Management: Use API Management policies or service mesh features for rate limiting, throttling and burst quotas against overload and abuse.
- Outbound Controls: Route all outbound connections through a Managed NAT / Egress Gateway with strict egress filtering (e.g., FQDN allow-listing). Add egress edge protection (WAF) if DLP or threat detection needs deep packet inspection.
- Network Isolation: Keep middleware services in private subnets. For high-bandwidth or sensitive integrations with partner clouds, use private connectivity (e.g., direct cloud provider network links or inter-cloud private links) instead of the Public Internet where possible.
Related Patterns
Use and cite this
Free to use and adapt under CC BY 4.0. Credit: David Tirabassi, IT Architecture Patterns.
Attribution: Source: David Tirabassi, IT Architecture Patterns (https://www.itarchitecturepatterns.net/patterns/int-middleware-cloud), licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/).