Prepare and test your skills
Prepare and test your skills
Synchronous and asynchronous integration patterns are two ways for Google Cloud services to exchange data with external systems across hybrid and multi-cloud environments. Synchronous integration uses direct API requests where the caller waits for a response, while asynchronous integration uses messaging where the sender and receiver work independently. In Google Cloud, Apigee supports synchronous API-driven designs and Pub/Sub supports asynchronous decoupled messaging, and the choice affects latency, availability, cost, and resilience to traffic spikes.
Synchronous API-driven integration is a request-and-response pattern in which a client in one environment calls an API in another environment and blocks until it receives a reply. Apigee is the API management platform that exposes backend services as managed APIs, and Apigee hybrid lets teams host and manage those gateways across Google Cloud, on-premises environments, edge locations, and other clouds. An API gateway or proxy acts as a unifying facade in front of diverse backends, so clients see one consistent API even when protocols, APIs, and authentication mechanisms differ behind it.
Traffic flows from the client application to the Apigee gateway, and then from the gateway through hybrid connectivity to the backend service in the other environment. In a hardened design, northbound client requests terminate at a load balancer that routes to the Apigee runtime through a Private Service Connect backend, and southbound requests flow from the customer virtual private cloud (VPC) through a Private Service Connect endpoint to an internal load balancer with hybrid connectivity network endpoint groups (NEGs) over VPN or Cloud Interconnect. Combining Cloud Load Balancing with the gateway adds global routing, multi-region failover, Cloud CDN caching to reduce latency and host APIs globally, and Cloud Armor for distributed denial-of-service (DDoS) protection and web application firewall (WAF) security.
A gateway deployed as a centralized control point performs consistent control functions across environments:
Synchronous calls create tight dependencies because availability and speed depend on both sides and the network path being healthy at the same time. Designs minimize high dependencies between systems in different environments, particularly when communication is synchronous, because those dependencies can slow performance, decrease overall availability, and increase outbound data transfer charges. To control that risk, designs use a Google Cloud region close to the private environment, high-availability and low-latency connectivity, IP address allowlisting to limit traffic to approved API sources and destinations, common identity across environments, and encryption in transit with VPN tunnels, HA VPN over Cloud Interconnect, or MACsec.
Asynchronous messaging integration is a decoupled pattern in which a publisher sends data to a messaging system and continues working without waiting for the receiver to process it. Pub/Sub is the Google Cloud messaging service for this pattern and is the managed equivalent for open-source systems such as Java Message Service (JMS) and Kafka. Frontend applications for user interfaces, APIs, and Internet of Things (IoT) data ingestion can use Pub/Sub alongside services such as Firebase, Apigee, Cloud CDN, App Engine, and Cloud Run.
Data flows from the producing system to a Pub/Sub topic, and then from the topic to each subscribing system on its own schedule, so producers and consumers do not need to be online at the same moment. The edge hybrid pattern (opens in a new tab) shows this clearly: time-critical and business-critical workloads run locally at the edge, while the internet link is used for management and to synchronize or upload data to Google Cloud, often asynchronously. IoT projects use the same idea by computing locally at the edge and selectively sending data to the cloud, which reduces capacity, data transfer, processing, and overall costs.
Asynchronous integration improves resilience to traffic spikes and connectivity loss because a temporary outage or surge does not block the sender. Each dependency between edge and cloud systems can undermine latency and reliability advantages, so minimizing cross-environment dependencies preserves self-sufficiency when links are intermittent, high-latency, or unreliable. Inbound movement from edge to Google Cloud might be free of charge, while sustained high outbound volume from Google Cloud should be planned with Cloud Interconnect to optimize performance and potentially reduce charges.
Choosing between synchronous and asynchronous patterns means matching timing and coupling to the integration problem. Synchronous APIs fit immediate request-and-response work, while asynchronous messaging fits decoupled work that must survive spikes, delays, and outages. The comparison below summarizes when each pattern fits.
A decision tree that branches on need for immediate response, resilience to spikes and outages, and edge IoT sync to choose Synchronous with Apigee or Asynchronous with Pub/Sub.
| Pattern | Coupling and timing | Choose when |
|---|---|---|
| Synchronous with Apigee | Caller and backend are coupled in time; caller waits for a response over Apigee, Cloud Load Balancing, and hybrid connectivity | The work needs an immediate answer, fine-grained API control, and a stable facade for legacy and modern backends |
| Asynchronous with Pub/Sub | Publisher and subscriber are decoupled in time; data flows from publisher to topic to subscriber | The work must absorb traffic spikes, tolerate intermittent connectivity, or synchronize edge, IoT, and frontend data without blocking |
Use synchronous integration when user interaction or service logic requires low-latency answers and controlled exposure of specific APIs through internal IP addresses. Use asynchronous integration when external service dependencies, variable traffic, or unreliable links would make waiting risky, such as IoT ingestion, edge-to-cloud synchronization, and phased migrations where backends move at different speeds.
Exam tip: Minimize synchronous dependencies between Google Cloud and other environments; keep synchronous APIs for immediate responses and use Pub/Sub decoupling when traffic spikes or intermittent connectivity could slow performance or reduce availability.
Hybrid and multi-cloud network connectivity is the set of network connections that link an on-premises data center, a Google Cloud VPC network, and other cloud provider networks. These connections carry all traffic between environments, so bandwidth, latency, packet loss, and jitter directly affect application performance. Choosing a connectivity method requires weighing network performance, security, cost, reliability and service level agreement (SLA), and scalability together.
Internet-based connectivity transfers data between Google Cloud and an on-premises or other-cloud environment over the public internet using public external IP addresses. Traffic flows from the Google Cloud region to Google's edge point of presence (PoP), across the internet or direct peering, and then from the other provider's edge PoP to its hosting region. Sensitive traffic should use application-layer encryption, such as TLS for APIs, because traffic can pass through third-party networks and is not encrypted by default. This option is simplest for occasional or low-volume exchange, but it has no SLA for connectivity to other providers and no guaranteed speed.
Cloud VPN (opens in a new tab) provides private, encrypted connectivity over the public internet using IPsec VPN tunnels. Traffic flows from the on-premises network through an encrypted tunnel to the VPC network, allowing private IP addressing instead of public IPs. Cloud Router exchanges routes dynamically between the VPC network and the on-premises network using Border Gateway Protocol (BGP), so new routes propagate automatically as the network changes. Customer-managed VPN gateways and network virtual appliances (NVAs), including software-defined WAN (SD-WAN) solutions from Google Cloud Marketplace, can also provide this type of connectivity. Choose Cloud VPN when private IP reachability and encryption are needed without a private circuit.
Cloud Interconnect provides private connectivity over private transport that does not traverse the public internet, with more deterministic performance and an SLA. Traffic flows directly between the on-premises network and the VPC network through VLAN attachments, and Cloud Router creates custom dynamic routes in the VPC network from BGP-learned routes. If encryption is required at the network layer, both Interconnect types support high availability (HA) VPN over Cloud Interconnect, and Media Access Control Security (MACsec) for Cloud Interconnect is also available. Cloud Interconnect reaches all Google Cloud products and services except Google Workspace, and it supports Private Google Access from on-premises hosts.
Dedicated Interconnect is a direct physical connection to Google that requires routing equipment in a colocation facility that supports the desired regions. Partner Interconnect connects through a supported service provider that connects directly to Google, so no colocation routing equipment is needed and more points of connectivity are available. Both options start at 50 Mbps per VLAN attachment, but Dedicated Interconnect scales with 10-Gbps, 100-Gbps, or 400-Gbps circuits, up to 8 circuits per connection, with VLAN capacities from 50 Mbps to 50 Gbps. Partner Interconnect offers flexible 50 Mbps to 50 Gbps per VLAN attachment, with increases dependent on provider capacity.
| Dimension | Dedicated Interconnect | Partner Interconnect |
|---|---|---|
| Path | Traffic flows directly between on-premises network and Google network | Traffic flows between on-premises network and Google network through a service provider |
| Setup | Requires routing equipment in a colocation facility | Uses a supported service provider, with no colocation equipment to maintain |
| Bandwidth | 10-Gbps, 100-Gbps, or 400-Gbps circuits, maximum 8 circuits per connection | 50 Mbps to 50 Gbps per VLAN attachment, limited by provider capacity |
| SLA | Google offers an end-to-end SLA between VPC network and on-premises network for Google-defined topologies | Google provides an SLA between Google and the service provider; end-to-end SLA depends on the provider |
Exam tip: Choose Dedicated Interconnect when you can place equipment in a colocation facility and need very high bandwidth; choose Partner Interconnect when you cannot meet Google directly and want flexible capacity without managing colocation equipment.
Cross-Cloud Interconnect is a managed private connection between a Google Cloud VPC network and a network hosted by another cloud service provider. Google provisions a dedicated physical connection between Google Cloud and the other provider, so the enterprise does not manage cross-connects or routing equipment in remote PoPs. To qualify for the SLA, you purchase a pair of connections, a primary connection and a redundant connection, with 10 Gbps or 100 Gbps capacity and high-availability options of 99.9% and 99.99%. Use a different pair for each provider when connecting to more than one cloud.
Cross-Cloud Interconnect supports private IP communication with line-rate performance and typically the lowest latency between clouds when regions and edge locations are close. Traffic is not encrypted by default, so sensitive traffic should use application-layer encryption or MACsec for Cloud Interconnect encryption where supported. Supported providers include:
Cloud Router is a distributed, fully managed BGP speaker that works with Cloud VPN, Cloud Interconnect, and router appliances to manage dynamic routes. Routes learned by Cloud Router from on-premises or other-cloud routers are applied as custom dynamic routes in the VPC network. This dependency means the VPC network depends on Cloud Router for automatic updates when remote address ranges or topologies change.
Network Connectivity Center (NCC) is a hub-and-spoke orchestration framework that connects VPC networks, hybrid connections, and router appliances through a central hub. Spoke resources, such as VPC spokes or hybrid spokes, attach to the hub, and NCC facilitates route exchange with the Cloud Router instance. Third-party NVAs, including supported SD-WAN routers, can integrate as router appliances to exchange routes with Cloud Router. Choose NCC when multiple sites, VPCs, and clouds must be managed and connected through centralized routing.
Implementing secure identity and access frameworks means giving every external user and workload a verified identity and only the permissions it needs to exchange data with Google Cloud. In hybrid and multi-cloud designs, Workload Identity Federation authenticates outside workloads without long-lived keys, Identity and Access Management (IAM) authorizes what each identity can touch, and VPC Service Controls creates a perimeter that blocks data from leaving to unauthorized places.
Federation lets Google Cloud trust identities that already exist outside Google Cloud instead of creating new passwords or keys. Workforce Identity Federation is for people when an organization already has an identity provider, while Workload Identity Federation (opens in a new tab) is for software workloads running on-premises or in another cloud that need access to Google Cloud resources.
Workload Identity Federation exchanges the workload's existing external credential for short-lived Google Cloud credentials, so code can call Google APIs without storing a downloadable service account key. Because the credentials expire quickly and are issued only after the external identity is verified, the risk of key theft and long-term misuse drops sharply. Choose federation over service account keys whenever an external system must authenticate to Google Cloud.
| Federation option | Who it authenticates | Choose when |
|---|---|---|
| Workforce Identity Federation | Human users from an existing identity provider | People need console or API access using the corporate identity provider |
| Workload Identity Federation | Application workloads outside Google Cloud | Code on-premises or in another cloud needs access to Google Cloud resources |
Exam tip: Workforce Identity Federation is for humans with an existing identity provider, while Workload Identity Federation is for non-human workloads outside Google Cloud — both replace long-lived keys with federated, short-lived access.
Application Default Credentials (ADC) is a standard way for application code to obtain credentials without hard-coding where the code will run. Libraries that support ADC, such as the Google Cloud client libraries, check known locations in the current environment for credentials, so the same code can run unchanged in different places.
When a developer runs locally, ADC can use the developer's user credentials for authentication. When the same code is deployed to production on a Compute Engine virtual machine, ADC uses the attached service account's short-lived credentials instead. ADC cannot be used to authenticate the gcloud CLI, which uses gcloud auth login, or to authenticate an API key, which only works with specific APIs.
Harden human and key-based access alongside federation by enabling multi-factor authentication for users, reviewing reauthentication settings, creating policies for managing API keys, and avoiding service account keys unless no more secure alternative exists. If a service account key must be used, validate any externally sourced credential before use and monitor audit logs for misuse.
VPC Service Controls is a Google Cloud control that defines a service perimeter around projects, VPC networks, and Google Cloud services to restrict access and reduce exfiltration risk. Once data is inside the perimeter, the policy applies to API calls to services such as Cloud Storage, BigQuery, and Pub/Sub, and it blocks requests from unauthorized networks or identities even if IAM would otherwise allow them.
Perimeters can be defined at the project or VPC network level to protect Google Cloud services in those projects. The perimeter can be extended to a hybrid environment over an authorized VPN connection or Cloud Interconnect link, so on-premises systems that meet the access rules can still reach protected APIs. This extension lets trusted hybrid callers flow into the perimeter while untrusted internet callers remain outside it.
The handover pattern (opens in a new tab) connects a private computing environment to Google Cloud through shared storage rather than direct database or VM access. External workloads upload data to Cloud Storage buckets or Pub/Sub topics, and Google Cloud-hosted workloads running in an application VPC consume that data for batch or streaming processing with analytics and AI services.
Data flows through an ordered sequence:
Access to the buckets and topics is locked down with IAM policies that restrict access to trusted workloads. Communication with Cloud Storage or Pub/Sub can travel over public networks or over private connectivity using VPN, Cloud Interconnect, or Cross-Cloud Interconnect, with a variation that uses Private Service Connect endpoints for Google APIs over private IP addressing. Choose private connectivity when traffic volume is high, the setup is permanent, or security and compliance requirements prohibit movement over the public internet, and use latency, cost, and expected transfer time to decide among the transfer options.
Synchronous integration with Apigee is a request-and-response pattern where the caller waits for a reply through the Apigee gateway, while asynchronous integration with Pub/Sub is a decoupled pattern where a publisher sends data to a Pub/Sub topic and subscribers receive it on their own schedule without the sender waiting. Synchronous APIs fit work that needs an immediate answer and fine-grained API control, while asynchronous messaging fits work that must absorb traffic spikes, tolerate intermittent connectivity, or synchronize edge, Internet of Things, and frontend data without blocking.
Use Dedicated Interconnect when you can place routing equipment in a colocation facility and need very high bandwidth, with 10-Gbps, 100-Gbps, or 400-Gbps circuits up to 8 circuits per connection. Use Partner Interconnect when you cannot meet Google directly and want flexible capacity of 50 Mbps to 50 Gbps per VLAN attachment through a supported service provider without maintaining colocation equipment.
Use Workforce Identity Federation when human users from an existing identity provider need console or API access using their corporate identity. Use Workload Identity Federation when application workloads outside Google Cloud need access to Google Cloud resources, because it exchanges the workload's existing external credential for short-lived Google Cloud credentials without storing a downloadable service account key.
An enterprise is planning hybrid connectivity between its on-premises data center and a Google Cloud Virtual Private Cloud (VPC) network to migrate internal core database workloads.
The network architecture team has outlined the following specific technical constraints and requirements:
Which hybrid connectivity solution should you recommend to satisfy these requirements?
Last updated