{"id":2157,"date":"2012-06-15T13:15:20","date_gmt":"2012-06-15T13:15:20","guid":{"rendered":"http:\/\/cloudnewsdaily.com\/?p=10661"},"modified":"2012-06-15T13:15:20","modified_gmt":"2012-06-15T13:15:20","slug":"bursting-into-the-clouds-experimenting-with-cloud-bursting","status":"publish","type":"post","link":"https:\/\/icloud.pe\/blog\/bursting-into-the-clouds-experimenting-with-cloud-bursting\/","title":{"rendered":"Bursting into the Clouds \u2013 Experimenting with Cloud Bursting"},"content":{"rendered":"<\/p>\n<p><strong>Guest Post by Dotan Horovits, Senior Solutions Architect at <a href=\"http:\/\/www.gigaspaces.com\">GigaSpaces<\/a><\/strong><\/p>\n<div id=\"attachment_10663\" class=\"wp-caption alignleft\" style=\"width: 150px\">\n\t<img loading=\"lazy\" decoding=\"async\" class=\"size-thumbnail wp-image-10663\" title=\"Dotan-Headshot\" src=\"http:\/\/d11be2feca2wef.cloudfront.net\/wp-content\/uploads\/2012\/06\/Dotan-Headshot-150x150.jpg\" alt=\"Dotan Horovits is one of the primary architects at GigaSpaces\" width=\"150\" height=\"150\" \/><\/p>\n<p class=\"wp-caption-text\">Dotan Horovits is one of the primary architects at GigaSpaces<\/p>\n<\/div>\n<p><strong>Who needs Cloud Bursting?<\/strong><\/p>\n<p>We see many organizations examining Cloud as replacement for their existing in-house IT. But we see interest in cloud even among organizations that have no plan of replacing their traditional data center.<\/p>\n<p>One prominent use case is\u00a0<em>Cloud Bursting<\/em>:<\/p>\n<p style=\"padding-left: 30px;\">Cloud bursting is an application deployment model in which an application runs in a\u00a0<a href=\"http:\/\/searchcloudcomputing.techtarget.com\/definition\/private-cloud\" >private cloud<\/a>\u00a0or data center and\u00a0<a href=\"http:\/\/searchnetworking.techtarget.com\/definition\/burst\" >bursts<\/a>\u00a0into a\u00a0<a href=\"http:\/\/searchcloudcomputing.techtarget.com\/definition\/public-cloud\" >public cloud<\/a>\u00a0when the demand for computing capacity spikes. The advantage of such a\u00a0<a href=\"http:\/\/searchcloudcomputing.techtarget.com\/definition\/hybrid-cloud\" >hybrid cloud<\/a>\u00a0deployment is that an organization only pays for extra compute resources when they are needed.<br \/>\n<em>[Definition from\u00a0<a href=\"http:\/\/searchcloudcomputing.techtarget.com\/definition\/cloud-bursting\" >SearchCloudComputing<\/a>]<\/em><\/p>\n<p>Cloud Bursting\u00a0appears to be a prominent use case in cloud on-boarding projects.\u00a0In a recent\u00a0<a title=\"Making Cloud Bursting a Practical Reality\" href=\"http:\/\/natishalom.typepad.com\/nati_shaloms_blog\/2012\/05\/making-cloud-bursting-a-practical-reality.html\" >post<\/a>, Nati Shalom summarizes nicely the economical rationale for cloud bursting and discusses theoretical approaches for architecture. In this post I\u2019d like to examine the architectural challenges more closely and explore possible designs for Cloud Bursting.<\/p>\n<p><strong>Examining Cloud Bursting Architecture<\/strong><\/p>\n<p>Overflowing\u00a0<em>compute<\/em>\u00a0to the cloud is addressed by\u00a0<em>workload migration<\/em>: when we need more compute power we just spin up more VMs in the cloud (the secondary site) and install instances of the application. The challenge in workload migration is around how to build a consistent environment in the secondary site as in the primary site, so the system can overflow transparently. This is usually addressed by\u00a0<a href=\"http:\/\/en.wikipedia.org\/wiki\/DevOps\" >DevOps<\/a>\u00a0tools such as\u00a0<a href=\"http:\/\/www.opscode.com\/blog\/category\/chef-2\/\" >Chef<\/a>,\u00a0<a href=\"http:\/\/puppetlabs.com\/\" >Puppet<\/a>,\u00a0<a href=\"http:\/\/cfengine.com\/\" >CFEngine<\/a>\u00a0and\u00a0<a href=\"http:\/\/www.cloudifysource.org\/\" ><wbr>Cloudify<\/wbr><\/a>,\u00a0which capture the setup and are able to bootstrap the application stack on different environments. In my example I used Cloudify to provide consistent installation between EC2 and RackSpace clouds.<\/p>\n<p>The Cloud Bursting problem becomes more interesting when\u00a0<em>data<\/em>\u00a0is concerned. In his\u00a0<a href=\"http:\/\/natishalom.typepad.com\/nati_shaloms_blog\/2012\/05\/making-cloud-bursting-a-practical-reality.html\" >post<\/a>\u00a0Nati mentions two approaches for handling data during cloud bursting:<\/p>\n<p><strong>1. The primary site approach<\/strong>\u00a0&#8211; Use the private cloud as the primary data site, and then point all the burst activity to that site.<br \/>\n<strong>2. Federated site approach<\/strong>\u00a0&#8211; This approach is similar to the way Content Distribution Networks (CDN) work today. With this approach we maintain a replica of the data available at each site and keep their replicas in sync.<\/p>\n<p>The primary site approach incurs heavy penalty in latency, as each computation needs to make the round trip to the primary site to get the data for the computation. Such architecture is not applicable to online flows.<\/p>\n<p>The federated site approach uses\u00a0<em>data synchronization<\/em>\u00a0to bring the data to the compute, which saves the above latency and enables online flows. But if we want to support \u201chot\u201d bursting to the cloud, we have to replicate the data between the sites in an ongoing streaming fashion, so that the data is available on the cloud as soon as the peak occurs and we can spin up compute instances and immediately start to redirect load. Let\u2019s see how it\u2019s done.<\/p>\n<p><strong>Cloud Bursting \u2013 Examining the Federated Site Approach<\/strong><\/p>\n<p>Let\u2019s put up our sleeves and start experimenting hands-on with the federated site approach for Cloud Bursting architecture. As reference application\u00a0let\u2019s take Spring\u2019s\u00a0<a href=\"http:\/\/static.springsource.org\/docs\/petclinic.html\" >PetClinic Sample Application<\/a>\u00a0and run it on an\u00a0<a href=\"http:\/\/tomcat.apache.org\/\" >Apache Tomcat<\/a>\u00a0web container. The application will persist its data locally to a\u00a0<a href=\"http:\/\/www.mysql.com\/\" >MySQL<\/a>\u00a0relational database.<\/p>\n<p>The primary site, representing our private data center, will run the above stack and serve the PetClinic online service. The secondary site, representing the public cloud, will only have a MySQL database, and we will replicate data between the primary and secondary sites to keep data synchronized. As soon as the load on the primary site increases beyond a certain threshold, we will spin up a machine with an instance of Tomcat and the PetClinic application, and update the load balancer to offload some of the traffic to the secondary site.<\/p>\n<p>On my experiment I used\u00a0<a href=\"http:\/\/aws.amazon.com\/ec2\/\" >Amazon EC2<\/a>\u00a0and\u00a0<a href=\"http:\/\/www.rackspace.com\/cloud\/\" >RackSpace<\/a>\u00a0IaaS providers to simulate the two distinct environments of the primary and secondary sites, but any on-demand environments will do.<\/p>\n<div>\n<p><strong>REPLICATING RDBMS DATA OVER WAN<\/strong><\/p>\n<\/div>\n<p>How do we replicate data between the MySQL database instances over WAN? On this experiment we\u2019ll use the following pattern:<\/p>\n<p>1.\u00a0\u00a0\u00a0\u00a0\u00a0<strong>Monitor data mutating SQL statements on source site<\/strong>. Turn on the\u00a0<a href=\"http:\/\/dev.mysql.com\/doc\/refman\/5.1\/en\/query-log.html\" >MySQL query log<\/a>, and write a listener (\u201cFeeder\u201d) to intercept data mutating SQL statements, then write them to GigaSpaces\u00a0<a href=\"http:\/\/www.gigaspaces.com\/datagrid\" >In-Memory Data Grid<\/a>.<\/p>\n<p>2.\u00a0\u00a0\u00a0\u00a0\u00a0<strong>Replicate data mutating SQL statements\u00a0over WAN<\/strong>. I used GigaSpaces\u00a0<a href=\"http:\/\/www.gigaspaces.com\/wiki\/display\/XAP9\/Multi-Site+Replication+over+the+WAN\" >WAN Replication<\/a>\u00a0to replicate the SQL statements \u00a0between the data grids of the primary and secondary sites in a real-time and transactional manner.<\/p>\n<p>3.\u00a0\u00a0\u00a0\u00a0\u00a0<strong>Execute data mutating SQL statements on target site<\/strong>. Write a listener (\u201cProcessor\u201d) to intercept incoming SQL statements on the data grid and execute them on the local MySQL DB.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-10662\" title=\"GigaSpaces-Bursting\" src=\"http:\/\/d11be2feca2wef.cloudfront.net\/wp-content\/uploads\/2012\/06\/GigaSpaces-Bursting.jpg\" alt=\"\" width=\"500\" height=\"375\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>To support bi-directional data replication we simply deploy both the Feeder and the Processor on each site.<\/p>\n<div>\n<p><strong>AUTO-BOOTSTRAP SECONDARY SITE<\/strong><\/p>\n<\/div>\n<p>When peak load occurs, we need to react immediately, and perform a series of operations to activate the secondary site:<\/p>\n<p style=\"padding-left: 30px;\">1.\u00a0\u00a0\u00a0\u00a0\u00a0spin up compute nodes (VMs)<\/p>\n<p style=\"padding-left: 30px;\">2.\u00a0\u00a0\u00a0\u00a0\u00a0download and install Tomcat web server<\/p>\n<p style=\"padding-left: 30px;\">3.\u00a0\u00a0\u00a0\u00a0\u00a0download and install the PetClinic application<\/p>\n<p style=\"padding-left: 30px;\">4.\u00a0\u00a0\u00a0\u00a0\u00a0configure the load balancer with the new node<\/p>\n<p style=\"padding-left: 30px;\">5.\u00a0\u00a0\u00a0\u00a0\u00a0when peak load is over \u2013 perform the reverse flow to tear down the secondary site<\/p>\n<p>We need to automate this bootstrap process to support real-time response to peak-load events. How do we do this automation? I used GigaSpaces<a href=\"http:\/\/www.cloudifysource.org\/\" >Cloudify<\/a>\u00a0open-source product\u00a0as the automation tool for setting up and for taking down the secondary site, utilizing the out-of-the-box connectors for EC2 and RackSpace. Cloudify also provides self-healing \u00a0in case of VM or process failure, and can later help in scaling the application (in case of clustered applications).<\/p>\n<p><strong>Implementation Details<\/strong><\/p>\n<p>The result of the above experimentation is available on\u00a0<a href=\"https:\/\/github.com\/dotanh\/cloud-bursting.git\" >GitHub<\/a>. It contains:<\/p>\n<p style=\"padding-left: 30px;\">\u00a7\u00a0\u00a0DB scripts for setting up the logging, schema and demo data for the PetClinic application<\/p>\n<p style=\"padding-left: 30px;\">\u00a7\u00a0\u00a0PetClinic application (.war) file<\/p>\n<p style=\"padding-left: 30px;\">\u00a7\u00a0\u00a0WAN replication gateway module<\/p>\n<p style=\"padding-left: 30px;\">\u00a7\u00a0\u00a0Cloudify recipe for automating the PetClinic deployment<\/p>\n<p>See the documentation on\u00a0<a href=\"https:\/\/github.com\/dotanh\/cloud-bursting.git\" >GitHub<\/a>\u00a0for detailed instructions on how to configure the above with your specific deployment details.<\/p>\n<p><strong>Conclusion<\/strong><\/p>\n<p>Cloud Bursting is a common use case for cloud on-boarding, which requires good architecture patterns. In this post I tried to suggest some patterns and experiment with a simple demo, sharing it with the community to get feedback and raise discussion on these cloud architectures.<\/p>\n<p>More information can be seen at an upcoming GigaSpaces webinar on Transactional Cross-Site Data Replication on June 20th (register at:\u00a0<a href=\"http:\/\/bit.ly\/IM0w9F\" >http:\/\/bit.ly\/IM0w9F<\/a>)<\/p>\n<div class=\"zemanta-pixie\" style=\"margin-top: 10px; height: 15px;\"><img decoding=\"async\" class=\"zemanta-pixie-img\" style=\"float: right;\" src=\"http:\/\/img.zemanta.com\/pixy.gif?x-id=fc921ccf-9dcf-4a99-900e-fcf0a44c1546\" alt=\"\" \/><\/div>\n<p><a href=\"http:\/\/feedads.g.doubleclick.net\/~a\/2QgSOfhU4Wc17wnkUlzib1-L74w\/0\/da\"><img decoding=\"async\" src=\"http:\/\/feedads.g.doubleclick.net\/~a\/2QgSOfhU4Wc17wnkUlzib1-L74w\/0\/di\" border=\"0\" ismap=\"true\"><\/img><\/a><br \/>\n<a href=\"http:\/\/feedads.g.doubleclick.net\/~a\/2QgSOfhU4Wc17wnkUlzib1-L74w\/1\/da\"><img decoding=\"async\" src=\"http:\/\/feedads.g.doubleclick.net\/~a\/2QgSOfhU4Wc17wnkUlzib1-L74w\/1\/di\" border=\"0\" ismap=\"true\"><\/img><\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/feeds.feedburner.com\/~r\/CloudNewsDaily\/~4\/jvoPaoat7ZM\" height=\"1\" width=\"1\"\/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Guest Post by Dotan Horovits, Senior Solutions Architect at GigaSpaces Who needs Cloud Bursting? We see many organizations examining Cloud as replacement for their existing in-house IT. But we see interest in cloud even among organizations that have no plan of replacing their traditional data center. One prominent use case is\u00a0Cloud Bursting: Cloud bursting is [&#8230;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[521,522,78,523,443],"tags":[112],"class_list":["post-2157","post","type-post","status-publish","format-standard","hentry","category-apache-tomcat","category-cloudify","category-guest-post","category-mysql","category-rackspace","tag-devops"],"_links":{"self":[{"href":"https:\/\/icloud.pe\/blog\/wp-json\/wp\/v2\/posts\/2157","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/icloud.pe\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/icloud.pe\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/icloud.pe\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/icloud.pe\/blog\/wp-json\/wp\/v2\/comments?post=2157"}],"version-history":[{"count":0,"href":"https:\/\/icloud.pe\/blog\/wp-json\/wp\/v2\/posts\/2157\/revisions"}],"wp:attachment":[{"href":"https:\/\/icloud.pe\/blog\/wp-json\/wp\/v2\/media?parent=2157"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/icloud.pe\/blog\/wp-json\/wp\/v2\/categories?post=2157"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/icloud.pe\/blog\/wp-json\/wp\/v2\/tags?post=2157"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}