Component: Cloud Controller

Page last updated:

The Cloud Controller provides REST API endpoints for clients to access the system. The Cloud Controller maintains a database with tables for orgs, spaces, services, user roles, and more.

Refer to the following diagram for information about internal and external communications of the Cloud Controller.

Cc communications map

View a larger version of this image.

Diego Auction

The Cloud Controller uses the Diego Auction to balance application processes over the cells in a Cloud Foundry installation.

Database (CC_DB)

The Cloud Controller database has been tested with MySQL.


The Cloud Controller manages blobstores for the following:

  • Resources: Files that are uploaded to the Cloud Controller with a unique SHA such that they can be reused without re-uploading the file

  • App Packages: Unstaged files that represent an application

  • Droplets: Result of taking an app package, staging it by processing a buildpack, and preparing it to run

  • Buildpacks: The buildpacks available to stage apps with

  • Buildpack Cache: Cached artifacts resulting from the staging process

The blobstore uses the Fog Ruby gem in order to use services like Amazon S3, WebDAV, or the NFS filesystem for storage.

Typically, the same blobstore is used to store all five types of blobs, but the Cloud Controller may be configured to use a separate blobstore for each type.

NATS Messaging

The Cloud Controller interacts with other core components of the Cloud Foundry platform using the NATS message bus. For example, the Cloud Controller uses NATS when performing the following interactions:

  • Instructing a cell to stage an application by processes a buildpack for the app and to prepare it to run
  • Instructing a cell to start or stop an application
  • Receiving information from the Health Manager about applications
  • Subscribing to Service Gateways that advertise available services
  • Instructing Service Gateways to handle provisioning, unprovisioning, binding, and unbinding operations for services


By default rspec runs a test suite with the SQLite in-memory database. Specify a connection string using the DB_CONNECTION environment variable to test against MySQL. For example:

    DB_CONNECTION="mysql2://root:password@localhost:3306/ccng" rspec

For more information about how Cloud Foundry aggregates and streams logs and metrics, see the Overview of the Loggregator System topic.

Create a pull request or raise an issue on the source for this page in GitHub