How do I get EC2 load balancing properly set up to allow for real time file syncing?

前端 未结 4 1615
礼貌的吻别
礼貌的吻别 2020-12-30 15:33

I\'m new to EC2. I have read a lot about it, watched many videos and tutorial and pretty much familiar with how everything work. I still have few question that I can\'t seem

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-30 15:59

    Do I need to have the database on RDS where every instance simply points to it.

    That is one option, or you can boot up another instance to sit behind the app servers, put MySQL on it and have them all connect to that instance. One thing to note, make sure to connect over the internal network using the private ip and make sure all your security is tight.

    How about user files. If a user uploaded a file to the site, then this file should be available immediately on all instances immediately, how is this possible. I don't think having 3 copies on 3 instances is very practical.

    No that is not practical. You could upload it to that backend db instance that they all have access to, but really you should probably upload it to S3 in a bucket that all your instances can use with s3tools or something.

    If i modify the site, let's say change the something in the CSS file, how do i sync the changes to all instances.

    Git. (or svn) But you could use cloudfront for your JS and CSS files.... not a bad idea. And use a S3 bucket as your source...

    How do EBS or S3 play a role in all of this.

    Your database should always be on ebs volumes so you dont lose it. S3 can be used to share and store files cheaply and easily across your entire environment.

提交回复
热议问题