designing your saas web-app for global scale on aws (amazon web services)

11
Designing your SaaS web-app for global scale http://linkedin.com/in/davidnedved On the Cloud

Upload: david-nedved

Post on 28-May-2015

2.399 views

Category:

Technology


0 download

DESCRIPTION

A few quick slides from my Talk at the Amazon Web Services User Group in Brisbane this September (2013), and why you should be building your SaaS for use on the AWS Cloud.

TRANSCRIPT

Page 1: Designing your SaaS web-app for global scale on AWS (Amazon Web Services)

Designing your SaaS web-app for global scale

http://linkedin.com/in/davidnedved

On the Cloud

Page 2: Designing your SaaS web-app for global scale on AWS (Amazon Web Services)

Software as a Service offers irresistible benefits for organizations of all sizes — from cost savings to scalability to mobile accessibility.

What is Saas?

As a term, 'Software as a Service' has been in common usage for nearly a decade.

And before SaaS, users generally rented software via an 'Application Service Provider' or ASP.

Page 3: Designing your SaaS web-app for global scale on AWS (Amazon Web Services)

For businesses, there are many potential benefits to be had from adopting your SaaS model.

Cost savings - Moving from the capital-heavy expense of installing, maintaining and upgrading on-premises IT infrastructure to the operational cost of a SaaS subscription is a tempting business proposition (particularly in the short-to-medium term!)

Scalability - As your business grows and you need to add more users, rather than investing in additional in-house server capacity and software licences you can adjust your monthly SaaS subscription as required.

Accessibility - A browser and an internet connection is all that's usually required to access a SaaS application, which can therefore be made available on a wide range of desktop and mobile devices.

Upgradeability - AWS deals with hardware and software updates (If running Amazon Linux), removing a significant workload from your in-house IT department (whose extra human bandwidth can, be released for different tasks, such as integration with existing on-premise applications).

Resilience - Because your application’s infrastructure & data, resides on AWS, if some form of disaster should strike your client’s business premises, you can get back up and running relatively easily from any location with internet-connected computers.

Why should you be building SaaS?

Page 4: Designing your SaaS web-app for global scale on AWS (Amazon Web Services)

Who’s running their SaaS on AWS?

One third of all internet users now visit an Amazon Web Services cloud hosted site/saas daily!!!

Page 5: Designing your SaaS web-app for global scale on AWS (Amazon Web Services)

You want to scale as big as Twitter?

Start using the the AWS API’s with the AWS SDK. Be adventurous and use DynamoDB, ElastiCache (Now with redis support!), SQS, and EMR!

So where do we start?

In under 20 lines of code you can create a simple API to read from Dynamo, this example will return JSON to the browser, Dynamo will handle the throughput / scalability!

Page 6: Designing your SaaS web-app for global scale on AWS (Amazon Web Services)

Dynamo’s secondary indexes now means you can get items other than the primary key without needing to query an index service (such as elasticsearch)

Dynamo now with Secondary Indexes

Page 7: Designing your SaaS web-app for global scale on AWS (Amazon Web Services)

DynamoDB only stores a limited amount of data.If you need to store large amounts of data Utilise S3 and Dynamo combined.

Architect your api for scale

Let your front-end application query your API and fetch Results from Dynamo & S3 … It’s good to let the browser do the work as this will use less load on your servers :)

Page 8: Designing your SaaS web-app for global scale on AWS (Amazon Web Services)

Use Route53’s Geographic DNS! - You can Auto-Scale your instances in each region, and let Route53 determine which endpoint to send traffic to depending on where your users are located geographically… (Route53 now supports Health Checks also!!)

Geographic DNS Rocks!

Page 9: Designing your SaaS web-app for global scale on AWS (Amazon Web Services)

Intaro Pinboard (Pinba - Board)Is a fantastic OSS tool that you can spin up on an EC2 Instance to monitor your application’s Health & Performance…

It’s a fantastic, FREE, Open Source Alternative to NewRelic!

Use OSS & CloudWatch!

Page 10: Designing your SaaS web-app for global scale on AWS (Amazon Web Services)

Socket.io does not work out of the box even with a TCP ELB because it makes two HTTP requests before upgrading the connection to websockets.

In-memory stateful data is the enemy of load-balancing. Thankfully, socket.io supports using Redis to store the data instead. If you share your redis connection with multiple servers, they essentially share the sessions of all clients.

Using Websockets and ELB?

See the socket.io wiki page for details on setting up Redis:https://github.com/LearnBoost/Socket.IO/wiki/Configuring-Socket.IO

Page 11: Designing your SaaS web-app for global scale on AWS (Amazon Web Services)

Questions, Beer & Thank You!

http://linkedin.com/in/davidnedved

http://aws.amazon.com/

Email: [email protected]

Designing your SaaS web-app for global scale