Skip to main content

Pivotal Cloud Foundry Developer Certification - Cloud Foundry Overview - ephemeral

What is meant by ephemeral? What are the design implications for an application?

Ephermeral: Virtual machines and container are temporary. Ephemeral is the cloud storage model where instance storage (storage consumed like conventional virtual disks) is implemented using DAS i.e. disk attached storage on the compute node/VM itself. This kind storage is not very reliable as it will go away with VM instance, it is called ephemeral.

Instance storage can be implemented in a reliable way using NAS i.e. network attached storage or volume storage i.e. db. OpenStack allow users to implement instance storage as ephemeral storage on the host, as files on NFS mount points or as cinder volumes using boot-from-volume.

For more details on cloud storage refer understanding-cloud-storage-models

We should avoid Writing to the Local File System or ephemeral storage. Applications running on Cloud Foundry should not write files to the local file system for the following reasons:
  • Local file system storage is short-lived. When an application instance crashes or stops, the resources assigned to that instance are reclaimed by the platform including any local disk changes made since the app started. When the instance is restarted, the application will start with a new disk image. Although your application can write local files while it is running, the files will disappear after the application restarts.
  • Instances of the same application do not share a local file system. Each application instance runs in its own isolated container. Thus a file written by one instance is not visible to other instances of the same application. If the files are temporary, this should not be a problem. However, if your application needs the data in the files to persist across application restarts, or the data needs to be shared across all running instances of the application, the local file system should not be used. We recommend using a shared data service like a database or blobstore for this purpose.

Non-Ephemeral (External file) storage is used by CF using volume services which allows app developers to read and write to a mounted file system from their apps.

For more details on volume services please refer using-vol-services

Comments

Post a Comment

Popular posts from this blog

Pivotal Cloud Foundry Developer Certification - Managed and User-Provided Services

1. What is a service? Can you name some examples? Services are cloud native apps dependencies. Consider S ervice as a factory that delivers service instances. Two types: 1. Managed services Cloud Foundry offers a marketplace of services, from which users can provision reserved resources on-demand. Examples of resources services provide include databases on a shared or dedicated server, or accounts on a SaaS application.  Example: my-sql, rabbitmq, redis etc... 2. User provided services User provided services provides the metadata to connect to the system outside the cloud. These services are not available in market place. This are custom services i.e. connecting to your own external DB or any other service outside the cloud i.e. erp etc.. Command to list the service instances in your space: cf services To see details of particular service cf service SERVICE_INSTANCE_NAME What is the “marketplace”? Does it show all services?  The Pivotal Cloud F...

Pivotal Cloud Foundry Developer Certification - Cloud Foundry Architecture

Can you name the main components running inside Cloud Foundry? Do you know what  each of them does? Main components are: Router :  routes incoming traffic to cloud controller or the hosted application in diego cell. It periodically queries the Diego bulletin board system to determine which cells and containers each application currently runs on. Using this router recomputes new routing table based on IP addresses of each cell VM and the host side port number for the cell's container. Oauth2 Server(UAA) and Login server work together to provide the identity management. Cloud controller and Diego brain: CC is responsible for application life-cycle and deployment. It directs the diego brain through CC Bridge component to coordinate individual Diego cells to stage and run applications. CC also maintains record of orgs, spaces, user roles and services. nsync : recieves the message from CC when user scales an app. It writes number of instances into a desiredLRP s...

Pivotal Cloud Foundry Developer Certification - Cloud Foundry Overview - Concepts

Cloud Foundry Concepts Cloud Foundry is the cloud native platform or PaaS i.e. Platform-as-a-service infrastructure which is basically PCF(Runtime & Middleware) + IaaS, where you just manage your application and data. Below diagram will help understanding it more. Deploying an application in IaaS vs PaaS IaaS deployment: 1. Provision a VM 2. Install application runtime 3. Deploy application 4. Configure load balancer 5. Configure SSL termination 6. Configure Service connectivity 7. Configure Firewall PaaS deployment: 1. cf push (CLI command), which will push your application and you do not need to take care of IaaS deployment steps. Scaling an application in IaaS vs PaaS IaaS: Same steps as deployment PaaS: cf scale Cloud Foundry is the open source platform that you can deploy to run your apps on your own computing infrastructure, or deploy on IaaS like AWS, vSphere, or OpenStack. How cloud foundry works CF has subsystems that perform speciali...