How do I update multiple EC2 instances that are load-balanced? [closed] - amazon-ec2

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
So, I have been playing around with Amazon Cloud (AWS) and I am trying to figure out how to get files on to all server's if they are load balanced.
At first I thought I could tie 3 different instances to a load-balancer and then have each instance utilize the same volume. That way all I would have to do is update the one volume with the recent build of the site and each instance would then access that. However, I have read that you can't share volumes across instances.
So what is the solution? Would I have to have the three instances all with the same data, and a forth that I could update? Then the forth would replicate the data across the other three.
Just trying to figure out how to update update the production files, and have all servers that are handling the load to pull in the most recent code base.

Yes all servers need to have identical content. You could do this by creating an NFS share or similar, and mounting it at the same point on each server. But apparently a decent workaround is to create snapshots of an EBS volume and then mount them on each instance. See http://linuxforlovers.wordpress.com/2009/04/11/sharing-amazon-elastic-block-store-among-multiple-instances/ for more details. Every time you want to commit your changes, you commit to the EBS volume only.

Related

Should I use multiple Meteor.js apps or a single app? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I have different applications running with Meteor JS. Each one starts its server under different ports when running locally. When hosted, I have them under sub-domains like messenger.mydomain.com, courses.mydomain.com, mydomain.com. I'm now considering performance if running multiple apps like this would have more odd impact on the server or combining the files into one so that all the 3 apps will be like: mydomain.com/messenger, mydomain.com/courses, mydomain.com.
Based on these two scenarios which will have a far more negative impact on the server?
I too have hosted 4-5 such Meteor apps on a single server using PM2 process Manager. Initially when a Meteor app starts it utilizes around 80-90 MB of RAM. Further, the consumption of the RAM and other parameters will depend on how good is your server CPU, Cores, etc.
Generally is it not an issue hosting such servers. But the most important fact you should remember is the no. of concurrent users connecting your different Meteor instances at various point of time. Currently, I have 40 concurrent users hitting on 4 instances each.
You just need to maintain server check every in order to purge process logs, even you might restart the servers as needed during downtime.
Below is the example of my hosting on CENTOS7. Everythings goes smoothly if you consider above precautions.

Scripting access to a website using different ips [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I would like to test automatically my website from different locations in order to localize content's presentation. I think I have to write a bash script to access the website with wget program, using an ip from a list. There is somewhere an established solution to this kind of problem ?
There is many solutions. I think to these ones :
IP spoofing. But it's not easy. In particular if you want orchestrate these tests to automate them...
Another solution is to use a reverse-proxy. An example: your application is hosted by Tomcat and you use Apache as reverse proxy. In this case you can easily configure several end-points in Apache where you lie about XFF
Another solution, you can rent VM in the cloud. This is a good approach if you want to perform real performance tests from a remote client, or check the behavior of Internet cache...
Some compagnies sells services to check availability of your web-stuff from different sites.

How does AWS EC2 scale if more resourses needed? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I launched a t1.micro instance running Apache and MySQL servers on Ubuntu. Basically I'm using it to host my photo sharing app that may have huge random spikes in terms of visitors.
How does AWS go about it?
Will the instance automatically upgrade to appropriate horse power to keep up with demand and growing storage demands?
No, you have to manually make your instance more powerful by first making sure it is in the stopped state (this requires EBS volumes or you'll lose your data), then going to the AWS console, right click your instance and select 'Change Instance Type'.
If you are interested in a more automated approach, I suggest an Elastic Load Balancer with an Auto-scaling policy. With Auto-scaling, Amazon will spin up or down new instances based on set points that you provide (i.e. CPU usage reaches 80% for 10 minutes).

Automatic Ejabberd clustering with EC2 (Amazon Web Services) [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
Using Ejabberd in EC2 as an XMPP server to send real-time information to clients...
How it is possible to set up clustering so that if the load on the server gets too much, Auto Scaling will create a new EC2 instance that is part of the Ejabberd cluster?
The documentation I've read suggests that you must already have the machines and manually configure each new one to be added to the cluster. Surely though you don't have to be running redundant EC2 instances just in case?
You'll need to do this manually, however a single ejabberd server can handle quite a lot of traffic. Each server adds a significant amount of available connections to your cluster, so it's not a common task.
That said, I'd really be careful running ejabberd in EC2. I've been doing it for about a year, and we fight mnesia network partitioning pretty regularly. Clustered ejabberd servers don't work very reliably in the EC2 network.
I am installing an infrastructure based on EC2 + ejabberd and have read this post. Do not you recommend? I planned to use as backend mysqlk (in AWS RDS) for tables that store large amounts of data. What do you think?

Costs of Amazon EC2 Large instance with instance-store [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I am not sure I understand the prices for EC2 instances.
Amazon writes:
Pricing is per instance-hour consumed for each instance, from the time an instance is launched until it is terminated.
So I will get billed for 100% a month, unless I terminate this instance completely and lose all the data on the instance-store? This confuses me, as the Amazon cloud is said to be a cheaper alternative. But for a Large instance I end up with about $250/month, which is quite expensive compared to other, non-cloud companies.
you will be billed 24 instance-hours per day if your instance (server) is online 24/7.
This is exactly the same as Windows Azure Web instances.
The be billed just for what I use, it's more about Files and Database, as the server should be always up and running.
If you compare VPS hosting companies with this prices, you will see Amazon/Windows are cheaper, keep in mind that you will have remote access to that server no matter what OS you are using (windows or Linux distro).
You can stop your instance can keep it's volumes. In that case you pay only for the storage while the instance is not running.

Resources