22
@tompeham I @usersnap FUNDAMENTALS ON BUILDING A RELIABLE CLOUD-BASED SAAS ARCHITECTURE

Fundamentals On Building A Reliable Cloud Infrastructure For Your SaaS Business

Embed Size (px)

Citation preview

Page 1: Fundamentals On Building A Reliable Cloud Infrastructure For Your SaaS Business

@tompeham I @usersnap

FUNDAMENTALS ON BUILDING

A RELIABLE CLOUD-BASED

SAAS ARCHITECTURE

Page 2: Fundamentals On Building A Reliable Cloud Infrastructure For Your SaaS Business

THIS IS ME!

@TOMPEHAM I @USERSNAP

Page 3: Fundamentals On Building A Reliable Cloud Infrastructure For Your SaaS Business

@TOMPEHAM I @USERSNAP

Say hi!

THIS IS ME!

Page 4: Fundamentals On Building A Reliable Cloud Infrastructure For Your SaaS Business

BEFORE WE GET STARTED…

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

Page 5: Fundamentals On Building A Reliable Cloud Infrastructure For Your SaaS Business

FUNDAMENTALS ON BUILDING A

HERE ARE THE

A RELIABLE CLOUD-BASED

SAAS ARCHITECTURE

Page 6: Fundamentals On Building A Reliable Cloud Infrastructure For Your SaaS Business

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.

Page 7: Fundamentals On Building A Reliable Cloud Infrastructure For Your SaaS Business

How to get started?

WHICH LANGUAGE?

WHICH DATABASE?

WHICH SOFTWARE?

Page 8: Fundamentals On Building A Reliable Cloud Infrastructure For Your SaaS Business

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.

Page 9: Fundamentals On Building A Reliable Cloud Infrastructure For Your SaaS Business

The perfect database

Documentdatabasesgettheirtypeinformationfromthedataitself.Thereforeeveryinstanceofdatacanbedifferentfromanyother.Thismakesitmoreflexibleindealingwithchangeandoptionalvalues,mapsmoreeasilyintoprogramobjects,andoftenreducesdatabase

size.

WHY?

We recommend making use of a

document-oriented database.

Page 10: Fundamentals On Building A Reliable Cloud Infrastructure For Your SaaS Business

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.

Page 11: Fundamentals On Building A Reliable Cloud Infrastructure For Your SaaS Business

MongoDB – the database for your web app?

Shardingisbasicallyamethodforstoringyourdataacrossmultiplemachines.AndMongoDBusesshardingtosupportdeploymentwithlargedatasets.

Page 12: Fundamentals On Building A Reliable Cloud Infrastructure For Your SaaS Business

Queuing system

Let’stalkaboutaqueuingsystemnow.

Amessagequeuingsystemisanasynchronouscommunicationprotocol,enablingsenderandreceiverofamessagenotinteractingatthesametime.

Messagequeuingtechnologyenableswebappstorunatdifferenttimesandtocommunicatewithvarious3rdpartyintegrations/APIs/andotherotherservicesasynchronously.

Page 13: Fundamentals On Building A Reliable Cloud Infrastructure For Your SaaS Business

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.

Page 14: Fundamentals On Building A Reliable Cloud Infrastructure For Your SaaS Business

AWS & EC2

Buildingascalablewebappyou’llprobablyendupatusingAmazonWebServicessoonerorlater.Ourguessissooner;)

AWSenablesyoutohostandrunyourwebappsaswellasperformingmassivehigh-performingbatchjobs.WithElasticComputeCloud(EC2)AWSprovidesscalablevirtualserversforeverybusiness.

Page 15: Fundamentals On Building A Reliable Cloud Infrastructure For Your SaaS Business

Why EC2?TheAmazonEC2isamust-haveforandtheheartofoursystemwhichprovidesresizablecomputingcapacity.Webasicallyhaverentedvirtualserversonwhichourwebappruns.

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

Page 16: Fundamentals On Building A Reliable Cloud Infrastructure For Your SaaS Business

Web Storage S3Gettingmoreandmoreusersonboardforyourproductwillmakeyoueasilywonderaboutyourwebstorage.WiththeAmazonS3storageservicewehaveagreat,andhighly-scalableobjectstorageinstalled.

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

Page 17: Fundamentals On Building A Reliable Cloud Infrastructure For Your SaaS Business

CDN & the big cloudy pictureAcontentdeliverynetworkisbasicallyasystemofdistributedserverswhichenablesyoutoservecontenttoyourappuserswithhighperformanceandhighavailability.

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

HowweatUsersnaphavesetupourwebappandtheroleofEC2,S3andCDN.

Page 18: Fundamentals On Building A Reliable Cloud Infrastructure For Your SaaS Business

Enjoyedthispresentation?

Page 19: Fundamentals On Building A Reliable Cloud Infrastructure For Your SaaS Business

Enjoyedthispresentation?

Yesyoudid?Awesome.

Page 20: Fundamentals On Building A Reliable Cloud Infrastructure For Your SaaS Business

Enjoyedthispresentation?

Yesyoudid?Awesome.

Giveitatweet!

Page 21: Fundamentals On Building A Reliable Cloud Infrastructure For Your SaaS Business

Enjoyedthispresentation?

Yesyoudid?Awesome.

Giveitatweet!

PLEASE!!!!!!

Page 22: Fundamentals On Building A Reliable Cloud Infrastructure For Your SaaS Business

ONE LAST THING…

JUST PING US ON TWITTER.