fundamentals on building a reliable cloud infrastructure for your saas business

Post on 23-Jan-2017

3.687 Views

Category:

Technology

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

@tompeham I @usersnap

FUNDAMENTALS ON BUILDING

A RELIABLE CLOUD-BASED

SAAS ARCHITECTURE

THIS IS ME!

@TOMPEHAM I @USERSNAP

@TOMPEHAM I @USERSNAP

Say hi!

THIS IS ME!

BEFORE WE GET STARTED…

You can find all resources here: http://goo.gl/Ki3ZEl

FUNDAMENTALS ON BUILDING A

HERE ARE THE

A RELIABLE CLOUD-BASED

SAAS ARCHITECTURE

Everything in the cloud

When building a (global) SaaS application chances are high that you’re building it in the cloud. The cloud

has a lot of advantages – think of scalability – in contrast to local server environments. Here’s

how to secure a cloud-based SaaS architecture.

How to get started?

WHICH LANGUAGE?

WHICH DATABASE?

WHICH SOFTWARE?

Which programming language?

Building a product for the cloud, means building a product with a modern programming languages.

There are various (modern) programming languages out there making it a hard time to choose the right one.

Take a look at the most prominent ones, play around with those and try to experiment as much as possible.

The perfect database

Documentdatabasesgettheirtypeinformationfromthedataitself.Thereforeeveryinstanceofdatacanbedifferentfromanyother.Thismakesitmoreflexibleindealingwithchangeandoptionalvalues,mapsmoreeasilyintoprogramobjects,andoftenreducesdatabase

size.

WHY?

We recommend making use of a

document-oriented database.

MongoDB – the database for your web app?

We – at Usersnap – ended using MongoDB as our prior database. Why we choose MongoDB? Because MongoDB is a document oriented

database that provides high performance, high availability, and easy scalability.

WhyMongoDB? ScalingyourtechwithMongoDBisprettyeasy(ok,atleasteasiercomparedtootherdatabases).Withautomaticshardingyoucandistributedataacrossvariousmachines.

MongoDB – the database for your web app?

Shardingisbasicallyamethodforstoringyourdataacrossmultiplemachines.AndMongoDBusesshardingtosupportdeploymentwithlargedatasets.

Queuing system

Let’stalkaboutaqueuingsystemnow.

Amessagequeuingsystemisanasynchronouscommunicationprotocol,enablingsenderandreceiverofamessagenotinteractingatthesametime.

Messagequeuingtechnologyenableswebappstorunatdifferenttimesandtocommunicatewithvarious3rdpartyintegrations/APIs/andotherotherservicesasynchronously.

RambitMQ (the system we use)

PythonwiththeopensourcecelerytaskmanagementlibraryistheperfectfittogetthemostoutofRabbitMQ.We’reusingasingle

RabbitMQserver,withmultipleendpointsthatfeedthequeuewithtasksaswellasendpointsthatprocessthosetasks(e.g.produceour

nice-lookingscreenshots).

HowweinstalledRabbitMQ

Again, I’d like to give you some insights on the queuing system we use, RabbitMQ. We run our web app in on the AWS EC2 where RabbitMQ can be run installed and run

super smoothly.

AWS & EC2

Buildingascalablewebappyou’llprobablyendupatusingAmazonWebServicessoonerorlater.Ourguessissooner;)

AWSenablesyoutohostandrunyourwebappsaswellasperformingmassivehigh-performingbatchjobs.WithElasticComputeCloud(EC2)AWSprovidesscalablevirtualserversforeverybusiness.

Why EC2?TheAmazonEC2isamust-haveforandtheheartofoursystemwhichprovidesresizablecomputingcapacity.Webasicallyhaverentedvirtualserversonwhichourwebappruns.

CurrentlywehavethreeEC2serverswhicharelocatedintheUS,IrelandandSingapore.We’llkeepaddingfurtherlocations(especiallyintheUSandEurope)sincethedemandofourproductkeepsincreasing.WiththeEC2installedit’ssupereasytokeepaddingnewserversandresources.

Web Storage S3Gettingmoreandmoreusersonboardforyourproductwillmakeyoueasilywonderaboutyourwebstorage.WiththeAmazonS3storageservicewehaveagreat,andhighly-scalableobjectstorageinstalled.

AmazonSimpleStorageService(S3)iseasytouse,storeandretrieveanyamountofdata.BesidestoringyourdataofyourwebappwithS3,itmightworkgreatforbackups,archivesorbigdataanalytics.

CDN & the big cloudy pictureAcontentdeliverynetworkisbasicallyasystemofdistributedserverswhichenablesyoutoservecontenttoyourappuserswithhighperformanceandhighavailability.

Let’sassumeyouhave3EC2sinstalled.OneintheUS,oneinEuropeandoneinSingapore.IfsomeonefromNewYorkvisitsyourapp,theCDNenablesyoutoservecontenttotheuserthroughtheEC2locatedintheUS.

HowweatUsersnaphavesetupourwebappandtheroleofEC2,S3andCDN.

Enjoyedthispresentation?

Enjoyedthispresentation?

Yesyoudid?Awesome.

Enjoyedthispresentation?

Yesyoudid?Awesome.

Giveitatweet!

Enjoyedthispresentation?

Yesyoudid?Awesome.

Giveitatweet!

PLEASE!!!!!!

ONE LAST THING…

JUST PING US ON TWITTER.

top related