I face the problem of sharing storage between multiple EC2 instances. I will have to do difficult tasks, so I need a lot of examples to do this. For one thing, I have an EBS volume attached to one server instance. On the other hand, I have a working instance. I created the AMI of this working instance, and then created several instances of this AMI instance. All work on one VPC. Basically, the server instance sends jobs, and workers complete the task. I would like to save some log files when my workers start jobs, in the partition store something like:
worker_1 / logfile.log
worker_2 / logfile.log
What could be the best solution for this?
- I read that it is not possible to add the same volume of EBS to multiple instances.
- I looked at GlusterFS , but here is what I found:
βBefore we implement the proof of concept with two servers in different access zones by replicating an EBS volume with ext4 file system, we will list the cases when GlusterFS should not be used: Serial files are written simultaneously from several servers, such as logs. A blocking system can lead to serious problems if you store the logs in GlusterFS. The ideal solution is to store them locally and then use S3 to archive them. If necessary, we can consolidate several server logs before or and after storing them on S3.
- And finally, I also checked the S3 bucket mounted with s3fs , but I found that this is also not a good option:
"You cannot partially update the file using s3fs, so changing one byte will reload the entire file." Then, if you want to make a little gradual change, then it is definitely not. You cannot use s3fs - S3 just does not work that way, you cannot step by step modify a file. "
Then what can be a good solution to my problems and allow my employees to write their log files to a shared repository?
Thank you for your help!
Romanzo
source share