Distributed system on Amazon EC2 -


how create cluster of computers in amazon ec2? best practices security? can access other machines in local network?

thanks!

the way aws likes utilizing security groups firewall.

generally each instance has security group - minimum 1 called default. security group allows white-list others can connect to.

the others include:

  • single ip addresses
  • ip networks
  • other security groups
  • everyone

example

  • database server:
    • db.example.org
    • security groups:
      • default
      • database
  • two application servers:
    • app1.example.org
    • app2.example.org
    • security groups:
      • default
      • appserver

i assume these instances run , have security groups associated them. if not -- it's pretty trivial using aws console. let me know if need pointers.

in examples, use aws ec2 cli tools.

first, open port 80 (web) on appservers everyone:

ec2-authorize appserver -p 80 

this cli command ec2-authorize, can on aws console well. above command allows connect port 80 on instances when have appserver group -- e.g. using browser go website.

then allow application servers connect database server:

ec2-authorize database -u yourawsuseraccountid -o appservers 

this allow each instance gets group appservers connect open port on database server. yourawsuseraccountid can found when log console , go "account > security credentials > account identifiers" (at bottom of page).

changes security groups take while become active. it's best when done before instance started.

hth


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -