1Google Service Control provides control plane functionality to managed services, 2such as logging, monitoring, and status checks. This page provides an overview 3of what it does and how it works. 4 5## Why use Service Control? 6 7When you develop a cloud service, you typically start with the business 8requirements and the architecture design, then proceed with API definition 9and implementation. Before you put your service into production, you 10need to deal with many control plane issues: 11 12* How to control access to your service. 13* How to send logging and monitoring data to both consumers and producers. 14* How to create and manage dashboards to visualize this data. 15* How to automatically scale the control plane components with your service. 16 17Service Control is a mature and feature-rich control plane provider 18that addresses these needs with high efficiency, high scalability, 19and high availability. It provides a simple public API that can be accessed 20from anywhere using JSON REST and gRPC clients, so when you move your service 21from on-premise to a cloud provider, or from one cloud provider to another, 22you don't need to change the control plane provider. 23 24Services built using Google Cloud Endpoints already take advantage of 25Service Control. Cloud Endpoints sends logging and monitoring data 26through Google Service Control for every request arriving at its 27proxy. If you need to report any additional logging and monitoring data for 28your Cloud Endpoints service, you can call the Service Control API directly 29from your service. 30 31The Service Control API definition is open sourced and available on 32[GitHub](https://github.com/googleapis/googleapis/tree/master/google/api/servicecontrol). 33By changing the DNS name, you can easily use alternative implementations of 34the Service Control API. 35 36## Architecture 37 38Google Service Control works with a set of *managed services* and their 39*operations* (activities), *checks* whether an operation is allowed to proceed, 40and *reports* completed operations. Behind the scenes, it leverages other 41Google Cloud services, such as 42[Google Service Management](/service-management), 43[Stackdriver Logging](/logging), and [Stackdriver Monitoring](/monitoring), 44while hiding their complexity from service producers. It enables service 45producers to send telemetry data to their consumers. It uses caching, 46batching, aggregation, and retries to deliver higher performance and 47availability than the individual backend systems it encapsulates. 48 49<figure id="fig-arch" class="center"> 50<div style="width: 70%;margin: auto"> 51 <img src="/service-control/images/arch.svg" 52 alt="The overall architecture of a service that uses Google Service Control."> 53</div> 54<figcaption><b>Figure 1</b>: Using Google Service Control.</figcaption> 55</figure> 56 57The Service Control API provides two methods: 58 59* [`services.check`](/service-control/reference/rest/v1/services/check), used for: 60 * Ensuring valid consumer status 61 * Validating API keys 62* [`services.report`](/service-control/reference/rest/v1/services/report), used for: 63 * Sending logs to Stackdriver Logging 64 * Sending metrics to Stackdriver Monitoring 65 66We’ll look at these in more detail in the rest of this overview. 67 68## Managed services 69 70A [managed service](/service-management/reference/rest/v1/services) is 71a network service managed by 72[Google Service Management](/service-management). Each managed service has a 73unique name, such as `example.googleapis.com`, which must be a valid 74fully-qualified DNS name, as per RFC 1035. 75 76For example: 77 78* Google Cloud Pub/Sub (`pubsub.googleapis.com`) 79* Google Cloud Vision (`vision.googleapis.com`) 80* Google Cloud Bigtable (`bigtable.googleapis.com`) 81* Google Cloud Datastore (`datastore.googleapis.com`) 82 83Google Service Management manages the lifecycle of each service’s 84configuration, which is used to customize Google Service Control's behavior. 85Service configurations are also used by Google Cloud Console 86for displaying APIs and their settings, enabling/disabling APIs, and more. 87 88## Operations 89 90Google Service Control uses the generic concept of an *operation* 91to represent the 92activities of a managed service, such as API calls and resource usage. Each 93operation is associated with a managed service and a specific service 94consumer, and has a set of properties that describe the operation, such as 95the API method name and resource usage amount. For more information, see the 96[Operation definition](/service-control/rest/v1/Operation). 97 98## Check 99 100The [`services.check`](/service-control/reference/rest/v1/services/check) 101method determines whether an operation should be allowed to proceed 102for a managed service. 103 104For example: 105 106* Check if the consumer is still active. 107* Check if the consumer has enabled the service. 108* Check if the API key is still valid. 109 110By performing multiple checks within a single method call, it provides 111better performance, higher reliability, and reduced development cost to 112service producers compared to checking with multiple backend systems. 113 114## Report 115 116The [`services.report`](/service-control/reference/rest/v1/services/report) 117method reports completed operations for 118a managed service to backend systems, such as logging and monitoring. The 119reported data can be seen in Google API Console and Google Cloud Console, 120and retrieved with appropriate APIs, such as the Stackdriver Logging and 121Stackdriver Monitoring APIs. 122 123## Next steps 124 125* Read our [Getting Started guide](/service-control/getting-started) to find out 126 how to set up and use the Google Service Control API. 127