Saturday, December 9, 2017

PCF - 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.

No comments:

Post a Comment

உப்பு மாங்காய்

சுருக்குப்பை கிழவி. சுருக்கங்கள் சூழ் கிழவி. பார்க்கும் போதெல்லாம் கூடையுடனே குடியிருப்பாள். கூடை நிறைய குட்டி குட்டி மாங்காய்கள். வெட்டிக்க...