I have 2 containers in a Fargate task definition. One of the containers is a database server. I'm wanting to persist the data directory. However, Fargate doesn't support the Source Path field when setting up a volume in the task definition. Does anyone know who to set up persistence in Fargate?
Having a persistent storage layer for your pods makes Fargate suitable for Kubernetes workloads like data analytics, media processing, content management, web serving, and many others that require functionalities like low latency, high throughput, and read-after-write consistency.
The term data persistence means that the data itself outlasts the process that created it. Data persistence in AWS is achieved by coupling compute and storage services. Similar to Amazon EC2, you can also use Amazon ECS to decouple the lifecycle of your containerized applications from the data they consume and produce.
EFS data can be accessed from all availability zones in the same region while EBS is tied to a single availability zone. EFS has the capability to mount the same persistent volume to multiple pods at the same time using the ReadWriteMany access mode.
Fargate tasks using Windows platform version 1.0.0 or later receive a minimum of 20 GiB of ephemeral storage. You cannot configure the ephemeral storage for Windows containers on Fargate. The ephemeral storage is encrypted with an AES-256 encryption algorithm, which uses an AWS owned encryption key.
AWS Fargate at this moment is targeted to stateless container solutions only, but we never know, maybe AWS is already working in a solution for it.
Remember you are sharing the same host with other AWS Customers. Your instance could be terminated and restarted in another host anytime. You also can scale out your service anytime.
You can use any of the options below:
use RDS for general purpose databases.
If your DB is not available you can start a new EC2 and install the database
AWS Fargate supports EFS volumes, at last!
I can think about 3 ways to do this:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With