Your SlideShare is downloading. ×
0
Resin, Deployment, Cloud, Clustering and EC2 (How To) Part II
Resin, Deployment, Cloud, Clustering and EC2 (How To) Part II
Resin, Deployment, Cloud, Clustering and EC2 (How To) Part II
Resin, Deployment, Cloud, Clustering and EC2 (How To) Part II
Resin, Deployment, Cloud, Clustering and EC2 (How To) Part II
Resin, Deployment, Cloud, Clustering and EC2 (How To) Part II
Resin, Deployment, Cloud, Clustering and EC2 (How To) Part II
Resin, Deployment, Cloud, Clustering and EC2 (How To) Part II
Resin, Deployment, Cloud, Clustering and EC2 (How To) Part II
Resin, Deployment, Cloud, Clustering and EC2 (How To) Part II
Resin, Deployment, Cloud, Clustering and EC2 (How To) Part II
Resin, Deployment, Cloud, Clustering and EC2 (How To) Part II
Resin, Deployment, Cloud, Clustering and EC2 (How To) Part II
Resin, Deployment, Cloud, Clustering and EC2 (How To) Part II
Resin, Deployment, Cloud, Clustering and EC2 (How To) Part II
Resin, Deployment, Cloud, Clustering and EC2 (How To) Part II
Resin, Deployment, Cloud, Clustering and EC2 (How To) Part II
Resin, Deployment, Cloud, Clustering and EC2 (How To) Part II
Resin, Deployment, Cloud, Clustering and EC2 (How To) Part II
Resin, Deployment, Cloud, Clustering and EC2 (How To) Part II
Resin, Deployment, Cloud, Clustering and EC2 (How To) Part II
Resin, Deployment, Cloud, Clustering and EC2 (How To) Part II
Resin, Deployment, Cloud, Clustering and EC2 (How To) Part II
Resin, Deployment, Cloud, Clustering and EC2 (How To) Part II
Resin, Deployment, Cloud, Clustering and EC2 (How To) Part II
Resin, Deployment, Cloud, Clustering and EC2 (How To) Part II
Resin, Deployment, Cloud, Clustering and EC2 (How To) Part II
Resin, Deployment, Cloud, Clustering and EC2 (How To) Part II
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Resin, Deployment, Cloud, Clustering and EC2 (How To) Part II

853

Published on

http://www.caucho.com/resin-application-server/3g-java-clustering-cloud/ …

http://www.caucho.com/resin-application-server/3g-java-clustering-cloud/

This covers setting up a Resin cluster in Amazon EC2. Much of the cluster setup would be the same in other environments as well. Resin is the only mainstream Java EE application server with clustering and cloud deployment built in and fully elastic that works in an EC2 environment. There are no add-ons, hacks, or tricks. Resin was simply designed to work well in the cloud. There are some extra things added for EC2, which would equally apply to other Virtualization 2.0 environments like Xen, and VMWare.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
853
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
15
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Resin, Deployment, Cloud, Clustering and EC2 (How To) Part 2 Session Replication, App Deployment and Clustering on EC2 Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved. caucho® , resin® and quercus® are registered trademarks of Caucho Technology, Inc.Thursday, April 5, 12
  • 2. Related  links • Part 1 Resin Java EE Application Server clustering and deployment to EC2 • Part 2 Resin clustering and deployment to EC2, session replication, Amazon Load Balancer (This in WIKI form) • Resin Java EE Application Server’s Cloud Support and Clustering Support • Resin White Paper on Java EE Cloud Computing • Short video describing key concepts: Resin Clustering and Cloud Deployment. Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.Thursday, April 5, 12
  • 3. Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved. caucho® , resin® and quercus® are registered trademarks of Caucho Technology, Inc.Thursday, April 5, 12
  • 4. Java EE Certified Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved. caucho® , resin® and quercus® are registered trademarks of Caucho Technology, Inc.Thursday, April 5, 12
  • 5. Java EE Certified Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved. caucho® , resin® and quercus® are registered trademarks of Caucho Technology, Inc.Thursday, April 5, 12
  • 6. Gartner names Caucho in "Cool Vendors in Platform and Integration Middleware" Java EE Certified Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved. caucho® , resin® and quercus® are registered trademarks of Caucho Technology, Inc.Thursday, April 5, 12
  • 7. Resin  works  well  in  the  cloud • This tutorial covers setting up a Resin cluster in Amazon EC2 • This is part 2, make sure you start with part 1 • Much of the cluster setup would be the same in other environments as well • Resin is only mainstream Java EE application server with clustering and cloud deployment built-in and fully elastic that works in an EC2 environment • No add-ons, hacks, or tricks needed • Resin simply designed to work well in cloud. • Resin supports EC2, • This EC2 support can equally apply to other Virtualization 2.0 environments like Xen, and VMWare Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.Thursday, April 5, 12
  • 8. Overview • IP addresses are ephemeral in EC2, public IP addresses are not known (can’t see them with ifconfig b/c NAT) • If you restart a server, it loses its IP addresses. • Think of DHCP, but the lease expires instantly if the box is not using it • In a spoke / hub architecture, you need to know how to find the hub. The hub is like a cluster DHCP server. It knows the topology of the cluster. • Resin clustering works around these issue by allowing Resin to use public IP to find Triad members, and then members exchanging private IP addresses • Resin typically discovers the server id by looking up the address combination of the instance. In this case, the local boxes do not know any address so you have to tell Resin what the server id is so it can look up the address it Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.Thursday, April 5, 12
  • 9. Overview  how  to  overcome • Create two Elastic IP addresses • assuming you are using two machines both in a single Cluster • Use Amazon Console to create another instance of the server you setup in the first tutorial. • The first three static servers in a cluster make up the Triad • Before you continue, you may want some more background on how Resins spoke and hub (Triad) clustering architecture works. Read White Paper: cloud and clustering technology optimized for EC2. • If you are in a hurry at least watch this short video: Resin Clustering and Cloud Deployment. Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.Thursday, April 5, 12
  • 10. Resin  Pro:  Clustering  and  Session  Replica;on • You will need to get an evaluation license or a license to use Resins clustering support. To get an evaluation license go here: Contact. • Once you have a license, you can copy it to /var/www/licenses Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.Thursday, April 5, 12
  • 11. Se<ng  up  second  Elas;c  IP  Address Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.Thursday, April 5, 12
  • 12. New  Amazon  AMI  instance Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.Thursday, April 5, 12
  • 13. Installing  a  Resin  Pro  License  4.0.27  and  below Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.Thursday, April 5, 12
  • 14. Installing  a  Resin  Pro  License  4.0.28  and  above Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.Thursday, April 5, 12
  • 15. Setup  Amazon  AMI  user-­‐data  passing  list  of  triad   Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.Thursday, April 5, 12
  • 16. 4.0.27:  Pass  Server  Id  Part  1  of  3 Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.Thursday, April 5, 12
  • 17. 4.0.27:  Pass  Server  Id  Part  2  of  3 Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.Thursday, April 5, 12
  • 18. 4.0.27:  Pass  Server  Id  Part  3  of  3 Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.Thursday, April 5, 12
  • 19. 4.0.28:  Pass  Server  Id  Part  1  of  1 • 4.0.28 is much easier to pass the server id Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.Thursday, April 5, 12
  • 20. Amazon  Load  Balancer • Create an Amazon Load Balancer. • Add the two instances to the LB. (Use the smallest possible recheck interval for testing). • Use sticky cookie support, use application cookie, set the name to JSESSIONID. • For more information on how to setup the Amazon Load Balancer go to this Amazon Load Balancer tutorial. • Now you have a Load Balancer and session replication should just works. Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.Thursday, April 5, 12
  • 21. Se<ng  up  Amazon  Load  Balancer  (Part  1  of  2) Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.Thursday, April 5, 12
  • 22. Se<ng  up  Amazon  Load  Balancer  (Part  2  of  2) Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.Thursday, April 5, 12
  • 23. Deploy  war  file  and  show  it  is  deployed   • Deploy the war file and show that it is deployed to every server Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.Thursday, April 5, 12
  • 24. Se<ng  up  third  Triad  Member Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.Thursday, April 5, 12
  • 25. 4.0.27:  Se<ng  up  a  Dynamic  Spoke  Server Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.Thursday, April 5, 12
  • 26. 4.0.28:  Se<ng  up  a  Dynamic  Spoke  Server Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.Thursday, April 5, 12
  • 27. Managing  deployments • Deploying to one Server deploys to every server in the cluster Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.Thursday, April 5, 12
  • 28. Summary  of  Servers  and  such Caucho Home | Contact Us | Caucho Blog | Wiki | Application Server / Web Server Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.Thursday, April 5, 12

×