Data Sync Between Ec2 instances

0

Hello Everyone,

What was the prefect way to sync data into Autoscaling groups ec2 instances..?

profile picture
gefragt vor 2 Jahren916 Aufrufe
1 Antwort
1

Hi THere

There are lots of ways to do this and it depends on the type of application, the OS, etc. You can use a sync tool, or use a shared filesystem. Here are some ideas (From https://serverfault.com/questions/569002/synchronize-aws-ec2-instances)

The simplest solution would probably to periodically run rsync to sync the changes on one host to another. There are also bidirectional tools similar to rsync, such as Unison. You could use lsyncd to monitor the filesystem, which starts Unison to then perform a sync. Here's a tutorial.

Another popular and simple way is to have a file server where you store your PHP files. These directories are shared via NFS and mounted by the actual webservers. This file server doesn't have to be powerful. With caching the file system performance is usually pretty good. Synchronisation is of course not instant, though quite good. It's usually good enough for a webserver and easy to set up.

Other more complex options are distributed file systems and related systems, such as GFS, GlusterFS, DRBD. I'll leave it to yourself to investigate these, but they're considered quite complex. They sync almost real-time but can be hard to set up and troubleshoot.
profile pictureAWS
EXPERTE
Matt-B
beantwortet vor 2 Jahren
  • So it means rsync is the best approach to sync data between ec2 instances..?

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen