Sie sind auf Seite 1von 21

544 lecture

CLOUD AND APPS

Cloud based application deployment platforms and components

544 lecture

CLOUD AND APPS

Define the parts of an application and what is affected by cloud architectures or concepts All applications are comprised of code What kind of code? .net code - .net framework Java code spring framework / grails Ruby code rails framework PHP code zend framework Python code django framework

544 lecture

CLOUD AND APPS

Define the parts of an application and what is affected by cloud architectures or concepts All applications use a database / datastore What kinds of databases? Oracle MySQL Postgresql MongoDB CouchDB SimpleDB / S3

544 lecture

CLOUD AND APPS

Define the parts of an application and what is affected by cloud architectures or concepts Some applications utilize engines. What kinds of engines? Algorithm / data mining engines cassandra / hadoop Data processing engines - oracle Image processing / video processing engines - Sorensen Natural language engines IBM engines

544 lecture

CLOUD AND APPS

Define the parts of an application and what is affected by cloud architectures or concepts What would make an application cloud vs not cloud? The application must be highly available The application must be highly scalable The application components must be distributable ...to be called cloud. Just because some code is on an EC2 machine does not make it a cloud application

544 lecture

CLOUD AND APPS

How do you make an application fit these requirements.? Usually you start with an application that is finished and make it fit these requirements This usually involves multiple VMs

544 lecture

CLOUD AND APPS

What are the architecture components required to make an application fit these requirements?

544 lecture What does everyone else use?

CLOUD AND APPS

544 lecture

CLOUD AND APPS

Where does everyone find this stuff out? http://highscalability.com/ Do we code any differently for scalable applications? Hopefully we code restfully and orient towards service architectures. You may have to add memcached hooks to some code Database queries should be optimized.

544 lecture

CLOUD AND APPS

What are these things? Load balancers spread the traffic around to free worker processes. Squid,varnish, Nginx, Unicorn (ruby), HAProxy, can all be used as load balancers / reverse proxys Web servers, not the same as application servers, web servers are nginx, or apache. What do the webservers do? SSL termination, Virtual host configurations (domain configurations), can also manage dividing processes between static and dynamic content to be returned

544 lecture

CLOUD AND APPS

Accelerator / caching: Varnish. Varnish can be used to compress and cache content Caching / Memcached binds to the application server (the language the code is written in). It is a distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.

544 lecture

CLOUD AND APPS

There are several types of datbases / datastores now, and usually you are looking at a few setups: Document or key/value stores (nosql) that can just keep spreading across machines. These are schemaless databases so they can be dynamically grown without having to replicate structure

544 lecture

CLOUD AND APPS

The CAP theorem is based on the observation that a distributed system is governed by three fundamental characteristics Consistency Availability Partition tolerance http://javathink.blogspot.com/2010/01/characteri

544 lecture

CLOUD AND APPS

Application server the place where the code runs, the code runtime PHPFPM can replace traditional PHP interpreter Crazy Facebook Hiphop thing Java application servers like tomcat, tcserver Windows server running in azure? Unicorn / ruby vm for ruby on rails C++ runtimes

544 lecture

CLOUD AND APPS

Application server specific deployment options Heroku http://www.heroku.com/how/observe Heroku runs modified Ruby Vms called dynos The ruby Vms are spun up as your application needs them

544 lecture

CLOUD AND APPS

Application server specific deployment options Cloud foundry / Vmware fabric Based on Terracotta http://www.cloudfoundry.com/ For running Java applications primarily What is the architecture, why is a java application suddenly a cloud application when deployed on this PAAS?

544 lecture

CLOUD AND APPS

Application server specific deployment options http://blog.cloudfoundry.com/post/5223861703/h Cloud foundry spins up and runs modified JVMs (java code runs in a JVM) The JVMs can now be workers / spawn as many machines with JVMs as your application needs Runs in a node/ cluster / controller fashion MySQL Databases are set up in redundant master / slave relationships for you Oracle databases are sharded

544 lecture

CLOUD AND APPS

There are several patterns going on here repeated on all of these platforms Load balancers / proxys look for worker processes that are available (unicorn sockets, tcserver JVMs, Ruby Dynos, PHPFPM workers) and using IAAS APIs (EC2, Vmware, UEC) spawn up new servers / workers if needed The very dirty implementation of this is amazon elastic load balancer The application code is run in these worker processes

544 lecture

CLOUD AND APPS

Data is fetched for the application from memcache if possible, if not from the database, or data is written to the database Queries to dynamic / static files can be separated by the proxy Responses back to the client are run through an accelerator, usually varnish. Images are zipped, content is zipped, images are zipped, compressed and served to the client. Everything gets unzipped when it reaches the client

544 lecture

CLOUD AND APPS

Client requests are marked in the URL or in session with a cookie to make sure further requests are sent back to the same server the load balancer sent the process to. Maybe you want to set up something like this to see how the pieces integrate. Here are some starting points Working with PHP / Nginx / Varnish http://danielmiessler.com/blog/optimizingwordpress-with-nginx-varnish-w3-total-cacheamazon-s3-and-memcached

544 lecture

CLOUD AND APPS

Why not set up cloudfoundry on Ubuntu? http://blog.dustinkirkland.com/2011/08/howto-install Why not set up the github configuration? You can only run ruby on rails projects though http://tomkersten.com/articles/nginx-unicorn-rvm-se

Das könnte Ihnen auch gefallen