New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
AWS Customer Presentation - adcloud
1. AWS Start-Up Conference 6/2010 Effective Cloud Computing at Amazon: The benefits and the challenges. joshua@adcloudmedia.com
2. Challenges – What can you expect? System issues Reasonable OS selections for most. Various Linux distributions are available including: Fedora, Gentoo, openSUSE, Ubuntu, Debian, Redhat Enterprise. Other options include OpenSolaris and Windows. No BSD distributions though. Some vendors don’t keep builds current (Fedora 8? Really?) In most cases, you can update system binaries to recent builds. It is nonetheless moderately inconvenient and can be a time consuming process. Some do stay current. Ubuntu, for example, stays up to date. A number of Amazon Partner provided images are provided by various software vendors. Oracle, MySQL images, IBM DB2, Informix AMIs. Apache, IIS/ASP.NET, Websphere AMIs. No custom kernel builds. But you can build kernel modules. These may be useful if you’re implementing some sort of clustering filesystem across your instance nodes, or any other lower level implementation. Redhat Enterprise beta is nice but it does have additional costs apart from Amazon EC2 instance costs. Large server deployments may become significantly more expensive.
3. Challenges – What can you expect? Mail (SMTP) issues. Amazon IP blocks are on many blacklists. Why? Relay your SMTP mail through a third party host. Not a huge deal, but an inconvenience regardless. Service providers for this - usually cheap and provide other helpful options like Anti Spam and Virus filtering for your inbound mail too. Depending on your business or application, your servers being associated with an IP blacklist may have an adverse effect on your business apart from your mail. Various web proxies and security appliances implement blacklist filtering. Some even use IP blacklists related to spam for HTTP filtering. Amazon is actively addressing the issue So it should be fixed soon.
4. Challenges – What can you expect? Elastic Load Balancer issues. Client (Source) IP address in HTTP requests come to you as the Elastic Load Balancer IP. Reference the HTTP X-FORWARDED-FOR header for the actual client IP address. Be wary of possible HTTP request header forgery. Amazon Load Balancers will append to HTTP X-FORWARDED-FOR request headers; not overwrite them. Client (Source) IP address in an HTTPS configured Elastic Load Balancer not readily available in the HTTP header. Elastic Load Balancers configured for HTTPS use don’t work at the HTTP protocol level (man in the middle issues) and use TCP instead. Referencing the Source IP address can be tricky but is possible using cookies/sessions before the HTTPS connection is established. Possibly there are other methods. Apache, lighttpd, nginx Log File Formats to store X-FORWARDED-FOR address.
5. Don’t panic Despite a few of the previously mentioned inconveniences - the technology is sound, stable and actively supported and widely used across the globe by a huge community of users and contributors.
6. Benefits Seamless scaling for your application’s demand. Easily handle massive volume at peak times and automatically scale down during slower periods. Know your traffic patterns. Cheap. Cheaper if you do it right. Even cheaper if you pre-pay instances too. You have to keep your eye on these expenses. Optimize your servers for the purpose of running as few as possible.
7. Benefits Amazon Elastic Load Balancing Other major cloud service vendors don’t offer load balancing. Managing your own redundant load balancers involves overhead (and paranoia). Hold up well under extreme conditions – our peak was 330 million HTTP requests in one day earlier this month. Super cheap. $0.025 per hour. API interaction with Elastic Load Balancers. Use shell scripts or code to perform tasks related to your load balancer and it’s associated amazon server instances.
8. Benefits Custom Image Builds Build your custom image (AMI) and deploy it across your network with ease. Roll back to previous image builds if there is a problem. Easily test and deploy your server optimizations. You can do all of this with a small shell script.
9. Benefits APIs EC2 API Manage your EC2 instances – spawn new instances, terminate existing instances, manage your keys, security groups, … Shell scripts implement the API too. Easy for non-programmers who have basic Linux shell scripting skills. Elastic Load Balancer (ELB) API Manage your Load Balancers easily, their configurations, their associated instances easily. Shell scripts implement the API too. Easy for non-programmers. Lots of cool uses of the API in existing applications. The AWS Management console. ElasticFox– a Firefox Plugin allows you to manage your EC2 instances and spawn new ones, among other things. Many others.
10. Benefits EBS Volumes Easily add more storage to your instance as needed. EBS Volumes are block devices that attach to your instance as a device (/dev/sdc). Format it yourself with your filesystem preferences and mount it where you prefer. Unmount it and move it to different instances But only in the same zone. I/O rates are significantly higher than the default filesystem on instances. Good for MySQL, … or any critical data that is accessed frequently. If your instance is terminated, the data on your EBS volume is still available and can be mounted somewhere else.
11. Various Tips Embrace the EC2/ELB API and their equivalent shell scripts. They will make your life easy. Packages for the shell scripts are available for quick install under most Linux distributions. Use them to perform actions on initial instance startup. You can use wget to fetch various instance properties from Amazon (instance ID, …) Fine tune your image builds for deployments Keep an ‘image building server’ running to update your custom image builds as necessary. Optimize, test, rebuild, … Rsync – essential tool. When you build a custom AMI it will have your source tree (at the time you build it), if you deploy updates to your source tree, new images you spin up will have old code. Rsync your source tree at boot time to make sure. SSH – essential tool. Use private key authentication and automate maintenance or statistics related actions as needed.
13. Cloud Computing: Doing it right Spin up an instance and never worry about it. It should automatically join a load balancer and serve requests. It should have current source trees for your application - thanks to rsync. Your MySQL replication should magically succeed with your refined custom image build. There are some tricks to this, but you have some options. It is worth mentioning that Amazon now has a relational database service (Amazon RDS) with supported database engines such as MySQL. It will actually provide asynchronous replication for you. Or various equivalent issues for your own application. The point is that things should be automatic and they should work again and again. Pay attention. Use scripts with the EC2/ELB API’s to monitor the status of your instances so you can uncover any issues that need resolution. Also to kill servers you don’t need. Or to spin up servers because you need more. Debug servers that have a problem so you can fix it and build an updated AMI if necessary. For example, check the number of HTTPD processes running. Or the number of MySQL threads running. Or the amount of space left on your instance partitions. Or …
14. Thanks! Download this presentation and some example scripts from http://adcloudmedia.com/AWS-Startup/ Poll a load balancer and query the status of server instances associated with it. Associate the current instance ID with a load balancer (useful for startup RC scripts). Disassociate instances from a load balancer and terminate them (useful for shutdown RC scripts).