Prepare and test your skills
Prepare and test your skills
API management and service integration is the practice of exposing application functions as controlled interfaces and managing how distributed services communicate. In Google Cloud, Apigee (opens in a new tab) handles edge exposure and policy control for APIs, Cloud Service Mesh (opens in a new tab) handles service-to-service traffic inside distributed architectures, and Cloud Load Balancing (opens in a new tab) distributes incoming traffic across frontends and backends.
Exposing applications with API management means placing a gateway between consumers and backend systems to enforce privacy, data integrity, and controlled communication. Traffic flows from clients or a cloud frontend to backend systems through Apigee, which applies access controls and traffic inspection policies before requests reach protected data and infrastructure. Apigee hybrid extends the same model to hybrid deployments and supports end-to-end mutual Transport Layer Security (mTLS), so identity is verified on both sides of the connection. Apigee deployments depend on network and observability foundations in the same Google Cloud organization, including a shared Virtual Private Cloud (VPC) that keeps gateway traffic inside a controlled boundary, Apigee Connect that links runtime to management plane, and Cloud Logging and Cloud Monitoring for visibility. In a tiered hybrid pattern, client requests arrive at the application frontend hosted in Google Cloud, and the frontend then sends data back to the on-premises backend ideally through an API gateway.
Managing service-to-service communication with a service mesh decouples business logic from networking in distributed applications. Requests flow directly from one service to another, but Cloud Service Mesh controls routing, retries, and failover between them so developers do not embed networking behavior in application code. The control plane manages traffic policy while the services themselves focus on business logic. The mesh typically provides resiliency features that protect an overloaded or failing service:
Choose a service mesh when many independent services must communicate inside the application boundary and need consistent traffic management without changing code in every service.
Distributing traffic with load balancing directs client and tier-to-tier traffic to healthy capacity across regions. Traffic flows from internet clients to a frontend load balancer that receives user traffic, then from the frontend tier through an internal load balancer to the backend tier, and finally to the data service exposed by Cloud SQL or Spanner. This layering separates scaling and availability needs by tier, so the presentation tier, application tier, and data access tier can operate independently while functioning together. Container platforms such as Cloud Run or Google Kubernetes Engine (GKE) host the frontend and backend workloads behind those load balancers. A global external Application Load Balancer creates a global dependency that spans regions, while regional deployments keep all components in one region for lower latency and simpler failure domains.
Exam tip: Use an API gateway to expose and protect APIs at the edge, and use a service mesh to manage retries, failover, and circuit breaking between services inside the boundary.
Building resiliency into integration limits the impact of a slow or failing dependency so one tier does not bring down the others. Exponential backoff spaces out retries with progressively longer waits, the circuit breaker pattern stops calls to a failing service, and graceful degradation returns limited or cached results when storage or a downstream service is unavailable. Together these patterns prevent a single slow dependency from causing cascading failures across tiers. The three control points compose in order across different scopes:
| Control point | Scope | Manages |
|---|---|---|
| Apigee | Edge between consumers and applications | API exposure, access control, and traffic inspection |
| Cloud Service Mesh | Service-to-service inside distributed applications | Routing, retries, failover, and circuit breaking |
| Cloud Load Balancing | Client-to-frontend and tier-to-tier entry | Distribution of traffic to healthy frontend and backend capacity |
The three controls compose in order: first Cloud Load Balancing directs traffic from the source to the destination tier, then Apigee enforces API policy at the exposure boundary, and then Cloud Service Mesh manages the service-to-service calls and resiliency behavior behind that boundary.
A left-to-right process flow showing how the three traffic controls compose in order: Cloud Load Balancing first directs traffic from the source to the destination tier, then Apigee enforces API policy at the exposure boundary, and finally Cloud Service Mesh manages service-to-service calls and resiliency behind that boundary.
Event-driven and asynchronous architectures decouple system components so work can continue even when another component is slow, overloaded, or unavailable. The design separates stateless and stateful services, protects communication between services from cascading failures, and uses queues and data-sharing patterns to share data without blocking. This separation improves scalability, recoverability, and fault tolerance across zones, regions, and clouds.
Stateless services for scalability and recovery handle each request independent of previous requests, so no in-flight data is lost when capacity changes. The service can grow, shrink, or restart without losing data required to handle any in-flight processes or requests. Statelessness is especially important when using an autoscaler, because the instances, nodes, or pods hosting the service can be created and destroyed unexpectedly. When all services cannot be stateless, be explicit about services that require state and keep clean separation between stateless and stateful services, so stateless services scale simply while stateful services receive more careful planning.
Managing communication between services addresses the risk that interdependencies grow as the network of services grows. Without protection, the failure of one service can result in the failure of other services, sometimes called a cascading failure. Three common patterns increase resiliency by reducing traffic to an overloaded service or handling the error gracefully:
A service mesh further decouples business logic from networking by linking services together in dedicated networking software. Traffic flows from the calling service through the mesh to the destination service, so retry and failover policy applies in the network layer rather than in application code.
Queues, files, and asynchronous storage act as persistence resources that let application services persist data using storage models specialized for messaging and file access patterns. A queue sits between the producing service and the consuming service, so the producer can write a message and continue work while the consumer processes it later. This decoupling means a slow or temporarily unavailable consumer does not block the producer, which improves fault tolerance. Caching complements this pattern by serving requests from memory and reducing reliance on disk-based storage, which lowers request latency and reduces load on downstream services, especially databases.
Choosing a data-sharing pattern for distributed services determines how updates flow between locations and how quickly they become consistent. The choice matters when service instances run in two or more deployment locations and each location needs access to shared data.
| Pattern | How data flows | Consistency and conflict handling |
|---|---|---|
| Partitioned data | The application writes data twice, once to each separate database partition, and no database connects directly to the other | Each partition stays independent with no automatic synchronization |
| Asynchronously replicated database (opens in a new tab) | Updates flow from the source database to the other database after a delay, and updates made in the standby location must propagate back to the primary location | Data is eventually consistent and concurrent updates in both locations require conflict resolution |
| Transactionally synchronized database | Every update flows immediately to all databases, which act as a single distributed database | Updates are transactionally consistent and immediately available in all locations |
Choose partitioned data when each part of the application owns its own database and can manage dual writes. Choose asynchronous replication when data from one cloud needs to be available in another cloud without waiting, such as replicating business data for analytics. Choose transactional synchronization when service instances are deployed to all locations and need the same consistent view at the same time.
Exam tip: Asynchronously replicated data allows delay and needs conflict resolution for concurrent writes, while transactionally synchronized data is immediately consistent in all locations.
Deployment strategies and application lifecycle is the end-to-end path that moves application code from development to production while keeping the application available. Source code flows from a repository to a build service, built artifacts flow to Artifact Registry (opens in a new tab) for storage, and Cloud Deploy (opens in a new tab) promotes those artifacts to target runtime environments in order. Monitoring and automated recovery protect each change along that path.
Building artifacts for consistent deployments turns source code into deployable packages such as container images or Java archives. The approach chosen for building affects build speed, maintenance effort, and application security, so consistent tooling matters across development and production. Artifact Registry provides a single location for managing packages and Docker container images and integrates with continuous integration and continuous delivery (CI/CD) tools and runtime environments to manage the full artifact lifecycle. Artifacts can be built with different tools that feed the same registry:
Cloud Build imports source code from Cloud Storage, Cloud Source Repositories, GitHub, or Bitbucket, executes a build to specification, and produces artifacts such as Docker containers or Java archives. Those artifacts then flow from Cloud Build to Artifact Registry, where versioned images and packages wait for deployment instead of being rebuilt separately for each environment.
Automating delivery to target environments moves tested artifacts through a defined promotion sequence without manual handoffs between environments. Cloud Deploy is the managed service that automates delivery of applications to a series of target environments in that defined promotion sequence. Because the same stored artifact flows from Artifact Registry through Cloud Deploy to the runtime, development and production run the same tested code. Containerized and serverless runtimes receive artifacts from the same pipeline:
The workflow depends on the registry as its source of truth, and each runtime depends on Cloud Deploy for ordered promotion. This separation lets teams update the build once in Cloud Build, store the result once in Artifact Registry, and promote that result step by step to test and then production environments.
Deploying infrastructure changes progressively rolls changes to a small scope first, verifies the result, and only then expands to all resources. Progressive rollout keeps high availability during updates because a bad change affects only a few resources and can be reverted quickly to the previous stable state. Global resources need extra control because a single misconfigured Virtual Private Cloud (VPC) network or global load balancer forwarding rule can stop the frontend from receiving user requests even when backends remain intact. A progressive infrastructure change follows an ordered sequence:
Exam tip: Global resources such as VPC networks and global load balancers are resilient to zone outages but can become single points of failure, so classify their modifications as high-risk changes that additional reviewers must verify and approve.
Automating provisioning and recovery uses code and event-driven actions instead of manual steps to create infrastructure and respond to failures. Automation minimizes human errors, produces more consistent results, and reduces the time needed to recover from failures. Automated failover can also increase cloud capacity during an incident so traffic shifts without waiting for a person to add resources. Automation relies on distinct services working together:
In this model, audit logs flow from Google Cloud to Eventarc or Workflows, and remedial actions flow from Workflows back to the affected resources. The deployment pipeline depends on IaC for repeatability, while running workloads depend on autoscaling and automated remediation for continuity.
Supporting safe updates with managed and redundant platforms recreates failed capacity and spreads load so no single resource blocks deployment. Managed services provide high availability backed by service level agreements plus built-in backup and resilience features. Choosing regional, multi-regional, or global scope over narrower zonal scope helps avoid restoring operations from backups after a zone or region problem. Redundancy removes single points of failure during the application lifecycle. Compute Engine managed instance groups automatically recreate failed VMs, while regional managed instance groups and GKE regional clusters remain resilient to zone outages. Cloud Load Balancing distributes traffic evenly across available resources, high availability configurations for Cloud SQL protect databases, and regional persistent disks use synchronous replication to keep data available.
Monitoring availability and separating high availability from disaster recovery tracks both infrastructure incidents and application-level failures introduced by changes. The Google Cloud Service Health Dashboard shows current service status across all regions, while the history page details incident duration, affected zones and regions, affected services, and workarounds. Personalized Service Health shows incidents relevant to a specific project, supports API access per project or organization, supports alerts, and provides RSS feeds for status updates. High availability (HA) (opens in a new tab) and disaster recovery (DR) cover different scopes in the lifecycle, with different replication and recovery behavior:
| Approach | Scope | Replication and recovery |
|---|---|---|
| High availability (HA) | Regional deployments across zones in one region | Synchronous replication between zones by default with zero or near-zero recovery time objective (RTO) and recovery point objective (RPO), supporting active-active topology without single point of failure |
| Disaster recovery (DR) | Multi-region deployments across two or more regions | Typically asynchronous replication when multi-regional or global services are not used, requiring assessment of RTO and RPO effects and manual or semi-automated failover operations |
An application can be unavailable even with no infrastructure outage, for example when a software update crashes app servers or an administrator deletes load balancer forwarding rules. Aggregate availability also falls as tiers are added, calculated as tier1_availability x tier2_availability x tierN_availability, so four tiers at 99.9% each yield about 99.6% overall. Increasing nines costs more in operational complexity and expense, since 99.9% allows about 86 seconds of downtime per day while 99% allows 864 seconds.
Use Apigee at the edge between consumers and applications for API exposure, access control, and traffic inspection, use Cloud Service Mesh for routing, retries, failover, and circuit breaking between services inside distributed applications, and use Cloud Load Balancing at client-to-frontend and tier-to-tier entry to distribute traffic to healthy frontend and backend capacity. The three controls compose in order with load balancing directing traffic to the destination tier, Apigee enforcing policy at the exposure boundary, and the mesh managing service-to-service calls behind that boundary.
An asynchronously replicated database sends updates from the source database to the other database after a delay, so data is eventually consistent and concurrent updates in both locations require conflict resolution. A transactionally synchronized database sends every update immediately to all databases acting as a single distributed database, so updates are transactionally consistent and immediately available in all locations.
Cloud Build produces artifacts such as Docker containers or Java archives that flow to Artifact Registry for versioned storage instead of being rebuilt separately for each environment. Cloud Deploy then promotes the same stored artifact through target environments in order, so development and production run the same tested code.
A financial enterprise runs a distributed microservices application inside an on-premises Kubernetes cluster managed with an Istio service mesh. The enterprise needs to expose several services to partner developers while implementing centralized API governance.
The solution must satisfy the following architectural requirements:
Which solution should the cloud architect recommend?
Last updated