architecting extremelylargescalewebapplications

Download Architecting extremelylargescalewebapplications

Post on 15-Jul-2015

97 views

Category:

Technology

1 download

Embed Size (px)

TRANSCRIPT

ARCHITECTING EXTREMELY LARGE SCALE WEB APPLICATIONS

New York times auto scaled to 500,000 users, HipChat has about 1.2 billion messages/documents stored, Sales force deals with 1,300,000,000 daily transactions with over 24,000 database transactions per second and over 22PB of raw SAN storage capacity, CinchCast has over 50 million page views a month, Pinterest has over 18 million visitors with a 10X growth rate, Amazon has over 55 million active customer accounts, Flickr has over 4 billion queries per day, Netflix has 48 million members with over 50,000 requests per second and the list goes on. . Thanks to HighScalability, where the above statistics are derived from, you get a picture of the websites and the scale that I am referring to! I had covered the SAAS requirements in my previous blog. . In this blog I shall provide a birds eye view of the technologies used by a few large scale websites and their impact on the multi-tier web application architecture. Reference: HighScalability has some awesome architecture blogs, I have derived the technology stack from multitude of articles hosted by highscalability and a few from Netflix blogshttp://highscalability.com/blog/category/exampleTechnology Stack

This section is not meant to be an extensive overview of each of the below websites and their technology stack, but rather provides an overview of the variety of tools used and the logical layers that form the architecture. NOTE: The below mentioned tools used by the companies are point in time and may have been changed.

Figure 1 NewYorkTimes Technology Stack

Figure 2 HipChat Technology stack

Figure 3 Salesforce Technology stack

Figure 4 Netflix Technology stack

I have elaborated on SAAS requirements and general architectural requirements in my previous blog.https://prashanthpanduranga.wordpress.com/2015/03/25/inevitability-of-multi-tenancy-saas-in-product-engineering/The requirements which apply the most to large scale web applications: Performance: There are lot of statistics published relating to performance implications of web applications. One such statistic, Users abandon website even if there is a 2 second delay during a transaction. Large scale web applications obviously have very high performance requirements. A very large percentage of applications gets redesigned primarily for a better user experience. Average Page Load Time as a fraction of Server and client time, Network time, Page views, Bounce Rate, Percentage Exit, Average Redirection Time, Average Domain Lookup Time, Average Server Connection Time, Average Server Response Time, Average Page Download Time, Average content load time, Average session time, DNS resolution time, TCP connection time, Time to first byte, Full page object load time, Requests per second, error rates, Peak response time, Uptime, CPU utilization, Memory Utilization are just a few metrics to look forAvailability: Business continuity is of utmost importance. Various availability techniques can be applied on every layer. AlwaysOn Failover Cluster Instances, AlwaysOn Availability Groups, Database mirroring, Log shipping, Redundancy models - Active-Active, Active-Passive, Redundancy Methods - Hot Standby, Warm Standby, Cold Standby, and the measurement of the same expressed as mean time to failure, mean time to repair, Availability as a measure of MTTF / (MTTF + MTTR), Eliminating single points of failure, Accelerating fault detection, isolation and resolution, hot spares, warm spares, cold spares, clustering, RAID, redundancy, Heart beats, watermarking resources, check pointing, Watch dogs and moreMonitoring and Diagnostics: 26 front end proxy serves. Double that in backend app servers [Atlassian HipChat], 15,000+ hardware systems [Salesforce], 100 hardware nodes in production [CinchCast], 180 Web Engines + 240 API Engines, 88 MySQL DBs (cc2.8xlarge) + 1 slave each, 110 Redis Instances, 200 Memcache Instances, 4 Redis Task Manager + 80 Task Processors, Sharded Solr [Pinterest], 1000+ supported devices [Netflix]Imagine maintaining those, when there are innumerable servers involved, failure of system components is common, needless to say, to take appropriate timely actions monitoring and diagnostics plays a very important role. Scalability: Capability of supporting and optimizing resource utilization on increasing workloads on various dimensions such as memory, cores, data structures, throughout and more. Goes without doubt that the application need to scale, in order for the application to perform well, and without automating it, the application cannot stay inexpensive. Automation: Identifying failures and automating re-provisioning of those components/servers is extremely importantArchitecture has significantly emerged from a monolithic architecture to microservices architecture.

Figure 5 Minimalistic layers

Lets take a look at the logical segregation of layers in current large scale web applications.

In the following table we look at some of the technologies used by high scale websites and compare them to other similar tools/technologiesNote: The technologies covered by the above websites was used as the benchmark for comparison. Comments are provided only where I wanted to provide additional details. Tools/software

Usage/DescriptionTOP few similar tools/software to considerComments

RabbitMQMessage broker systemMessage oriented middlewareQueuing softwareESBActiveMQ, Amazon SQS, HornetQ, HiveMQ, JMS, Kafka, ZeroMQ, MSMQ, NServiceBus, Azure Service Bus, OpenMQ, Redis, Storm, Akka, Apache Camel and Spring, OFM, Fuse ESB, WebsphereMQ, Windows Service Bus, BizTalk, WSO2, Mule, Talend ESB, Gearman, JBoss, ServiceMix, OpenESB, Apache QPIDLook out for AMQP compliance Some of the tools referred arent Message brokers but are used in conjunction to perform the sameOther AMQP PIKAShovel

KinesisReal time data processingKafka, Storm

TornadoWeb ServerHTTP ServerNginx, Apache, IIS, lighttpd, haproxy, varnish, glassfish, Jetty, Geronimo, Tomcat, Some are even used as reverse proxy, proxies,

CassandraDistributed database management systemMongodb, aerospike, accumulo, azure table storage, bigtable, couchbase, couchdb, dynamodb, datastax, ElasticSearch, Greenplum, Vertica, HBase, InfiniDb, InnoDB, MariaDB, neo4j, Netezza, TeraData, RedShift, Riak, RavenDB, Solr, Spark, VoltDB, With over 200 dbs, its difficult to list all: Checkout the below linkhttps://prashanthpanduranga.wordpress.com/2013/12/23/why-nosql-ok-but-why-so-many/Some of them are dataware housing Solutions, While some are data processing engines

HanaIn-Memory databaseGemFire, Hekaton, Aerospike, BigMemory, DataBlitz, EhCache, eXtremeDB, FuelDB, HazelCast, MonetDB, Coherence, VoltDBAny Key value store can be used for the same, some of the enterprises have experimented using NoSQL store used as a cache and unstructured db solution

LinuxOperating SystemSUSE, FreeBSD, Solaris, Debian/Ubuntu, Windows Server, Mac OS X, RHELOnly Server OS included in the list

SockJSWeb Socket like objectWeb socket, socket.io, atmosphere, SignalR, Alchemy, FleckCouple of them listed are open source

LibevEvent LoopLibEvent, Asio, Nginx, epoll

FabrikVisual programming IDEAlso known for Content construction Kits (CCK)IDE: Visual Studio, Eclipse, NetBeans, AptanaCCKS: Seblod, K2, chronoform, Zoo, Breezingforms, Cobalt, FlexiContent

JavaProgramming languageC, C++, Python, C#, PHP, Javascript, Ruby, R, Matlab, Objective-C, Visual Basic, Perl, Swift, Scala, Shell, GO, LISP, SAS, F#, Groovy, LuaSome of them listed are web programming languages adiitionals: HTML, SQL, Haskell

TwistedEvent driven network programming frameworkTornado, Django, Asyncio,

AWSCloud providerAzure, Rackspace, CenturyLink, Salesforce, Engineyard, Google, OpenStack, SAP, CloudBees, CumuLogic, Eucalyptus, Gigaspaces, Mulesoft, Parallels, Pivotal, puppet Labs, Ravello, Rightscale, SoftwareAG, Xively, AT & T, Cisco, Comcast, EMC, GoGrid, CSC, HP, IBM smartcloud, Joyent, The list includes infrastructure, platform, storage and security cloud providers

LuceneTest search Engine LibraryAzure Search, Autonomy, Solr, GSA, Attivio, DTSearch, elasticSearch, endeca, FAST, MarkLogic, Nutch, Sphinx, Sketchy, ScumblrA few NOSQL databases have been used for the same, This list does not include all the NOSQL databases that could be used

Adobe AirCross-platform runtimeCordova(Phonegap), Appcelerator, Qt, Sencha, cocos2d-x, Xamarin, ionic, Kony, mono, xcodeThe ones listed here are cross platform as well as mobile development platforms.

SensuMonitoring FrameworkZabbix, Nagios, icinga, monit, Riemann, statsd, graphite, zenoss, collectd, munin, cacti, new Relic, ganglia, splunk, sentry, dynatrace, datadog, skylight, zenoss, observium, spiceworks, solarwinds, fiddler, wireshark, httpwatch, firebug, soapUI, OpManagerThe list includes some of the: Infrastructure monitoringSearching, monitoring and analysing, Network monitoringScalable distributed monitoring system

PagerDutyNeoLoadIncident management systemand performance testing and monitoringOpsGenie, VictorOps, xmatters, pingdom, Gomez, webpagetest, monitis, uptrends, keynote, OpsView, Apache JMeter, LoadRunner, WebLOAD, Appvance, NeoLoad, LoadUI, WAPT, Loadster, LoadImpact, Soasta, Rational Performance Tester, Testing Anywhere,OpenSTA,QEngine (ManageEngine), Loadstorm, CloudTest, Httperf, SilkPerformer, BlazeMeter, Visual Studio Test Suite, Also includes web site monitoring Cloud based quality testingPerformance monitoring

ChefIT AutomationPuppet, ansible, salt, docker, Jenkins, Capistrano, saltstackConfiguration management, SCCM

memCacheDistributed memory object cachingApc, memcached, dynacache, ehcache, xcache, key value based NOSQL databases are also used

RazorPhysical and virtual hardware provisioni