Professional Cloud Developer
Professional Cloud Developer
Gauge your current knowledge
Gauge your current knowledge
Professional Cloud Developer
Gauge your current knowledge
Gauge your current knowledge
When building an application, choosing where to store data depends on the structure of the data and how users must access it. For unstructured files like images, videos, or backups, applications write directly to Cloud Storage, which stores data as objects in buckets. For structured relational data that requires transactional consistency, developers choose between Cloud SQL for standard relational databases and Cloud Spanner for massive, horizontally scaling global relational databases. For non-relational (NoSQL) needs, Cloud Firestore manages hierarchical document data for mobile and web apps, while Cloud Bigtable handles high-throughput, low-latency analytical workloads.
To connect an application safely to a database, developers must establish secure trust boundaries. Instead of hardcoding database credentials, applications use the Cloud SQL Auth Proxy to automatically encrypt traffic and authenticate using Identity and Access Management (IAM) permissions. To prevent databases from being overwhelmed by too many simultaneous connections, the application tier should implement connection pooling, which keeps a set of database connections open and ready for reuse. If read performance becomes a bottleneck, developers can place Cloud Memorystore in front of the database to cache frequently accessed data in-memory, reducing the load on the primary database.
To interact with Google Cloud services, applications must authenticate securely with the Google Cloud APIs. The standard way to handle this is through Application Default Credentials (ADC), which is a helper library that automatically searches for credentials in a specific order depending on where the application is running. When running inside Google Cloud, such as on a virtual machine or a container, ADC automatically retrieves credentials from the environment's associated Service Accounts. During local development, ADC looks for credentials created by the Google Cloud CLI, allowing developers to run the exact same code in local and production environments without changing hardcoded keys.
Once authenticated, applications make requests to GCP APIs using Google Cloud Client Libraries, which are optimized for performance and support modern protocols like gRPC instead of standard REST. To prevent services from being overloaded, Google Cloud enforces quotas and rate limits on API requests. If an application hits these limits or encounters temporary network glitches, it should use exponential backoff to retry the request, which means waiting progressively longer between each retry attempt to avoid flooding the API.
Understanding how an application behaves in production requires a continuous flow of diagnostic data. Applications emit log messages and performance metrics that are captured by Cloud Logging and Cloud Monitoring. The data flows from the application runtime to local agents, which then push the data across the network boundary to the central logging and monitoring backends. Developers can set up alerting policies in Cloud Monitoring that trigger notifications when performance metrics, such as error rates or CPU usage, cross a defined threshold, allowing teams to respond before users are affected.
When an error occurs or the application slows down, developers use specialized tools to pinpoint the root cause. Error Reporting automatically aggregates crashes and unhandled exceptions from Cloud Logging, grouping similar errors together and alerting developers to new bugs. To find performance bottlenecks in distributed architectures, Cloud Trace tracks the lifecycle of a single user request as it flows across multiple microservices, showing exactly which service is causing a delay. For deep code-level analysis, Cloud Profiler continuously analyzes CPU and memory consumption in production with minimal overhead, helping developers identify inefficient code paths that waste resources.