Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EC2: can I host an http server there?

Does anyone have experience deploying GWT apps to EC2?

If I were to install tomcat or apache on a ec2 instance, could I have users connect directly to a url pointing there?

Would that be cost effective, or would java hosting services be best?

Is there any downside to hosting the edge HTTP server on a regular hosting service and have that direct requests to EC2? Performance ever an issue here?

like image 303
user37468 Avatar asked Nov 14 '08 04:11

user37468


People also ask

How do I enable HTTP in AWS instance?

Select the check box next to your web server instance. Select the Actions drop-down menu at the top of the page. Select Security and then Change Security Groups. For Associated security groups, select the search box and choose the security group that you created for HTTPS.

Can I use EC2 to host website?

Use Amazon Elastic Cloud Computing (Amazon EC2)To use EC2 to host your website, you will need to create and configure an EC2 instance in the AWS Management Console.

How you can allow or block HTTP requests from your AWS EC2 instance?

To allow or block specific IP addresses for your EC2 instances, use a network Access Control List (ACL) or security group rules in your VPC. Network ACLs and security group rules act as firewalls allowing or blocking IP addresses from accessing your resources.


2 Answers

Other answers are correct but I just wanted to share the fact that we are are developing a product that is 100% EC2/S3 based and also have a pure GWT front end.

We use maven2 for builds and the excellent gwt-maven plugin. This makes it easy to produce a WAR package of our web application as output. We use Jetty but Tomcat would work just as well.

We have pound (a http accelerator/load balancer) running on the VM listening for http & https, which then forwards to requests to lighttpd (static) or jetty (app). This also simplifies SSL certificates because pound handles SSL. I've found Java servers have always been a pain to configure with SSL certs.

like image 130
Mark Renouf Avatar answered Oct 12 '22 01:10

Mark Renouf


Yes, you can host pretty much whatever you want, as you effectively have a dedicated Linux machine at your command.

As I last recall, the basic rate for an EC2 instance, on their "low end box" worked out to around $75/month, so you can use that as a benchmark against other vendors. That also assumed that the machine is up 24x7 (since you pay for it by the hour).

The major downside of an EC2 instance is simply that it can "go away" at any time, and when it does, any data written to your instance will "go away" as well.

That means you need to set it up so that you can readily restart the server, but also you need to offline any data that you generate and wish to keep (either to one of Amazons other services, like S3, or to some other external service). That will incur some extra costs depending on volume.

Finally, you will also be billed for any traffic to the service.

The thing to compare it against is another "Virtual Server" from some other vendor. There is a lot of interesting things that can be done with EC2, but it may well be easier to go with a dedicated Virtual hosting service if you're just using a single machine.

like image 35
Will Hartung Avatar answered Oct 12 '22 01:10

Will Hartung