scale net apps in aws

Post on 16-Jul-2015

39 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

AutoScale .NET Applications in Amazon Web Services

Start using auto scale today!

Liviu Costea @clm160Development Lead, BizPro Technologies

agenda

• Scalability vs Auto Scale?

• To be able to scale, you need• A Load Balancer (web applications)

• To solve your session issues

• Auto Scale means actually monitoring your app

beginnings

• Why Amazon Web Services (2011)?

• Pros:• Infrastructure – easy to start

• Mature, big platform

• Cons:• No AD Services (added in 2014, improved in 2015)

• No SQL Server HA (RDS added in 2014)

scalability – what is?

• Scalability is the ability of a system, network, or process to handle a growing amount of work in a capable manner or its ability to be enlarged to accommodate that growth -en.wikipedia.org/wiki/Scalability

• Vertically and Horizontally

© bframe.com

autoscaling – what is?

• Auto-scaling, also spelled autoscaling, is a cloud computing service feature that automatically adds or removes compute resources depending upon actual usage - itknowledgeexchange.techtarget.com

• Mostly horizontally

• Scale Up and Down

© dev.mlsdigital.net

an application

• 2 Web Servers with 2 web services each under a LB (2012)

• 3 Application Servers each with 2 Windows Services (2012)

• 2 to 5 Application Servers each with 2 Windows Services (2015)

• 1 SQL Server with 2 databases (2012)

• 3 SQS, 1 Memcached (ElastiCache) cluster with 3 nodes (2015)

web application - load balancing

• AWS Elastic Load Balancer• Hidden public machines - Round Robin on DNS

• Has Health Check (out of service)

• No IP control

• Sometimes you might need a reverse proxy

© blog.celingest.com

web applications - state

• Classic solution – Sticky Sessions – go over it

• Build your session for out of process from the start (StateServer, SqlServer, Redis)• Be careful on what you put in Session – loads on every request

• Session might timeout

• Cache layer for big items

code 1 – not working as expected

code 2 – working

workers

• Don’t rely on application machines (OnStart/OnStop)• Your application starts fresh, which is not always great – go for no warm up

and if needed load from cache

• Your application also needs to be able to stop

monitoring your app

• Log mechanism outside of the machine (S3, SQL, NoSQL)

• Think of monitoring from the start• That it is running

• That is doing the right thing

• That it is able to process everything

monitoring your app

• AWS CloudWatch• Standard Metrics

• Custom Metrics - PowerShell

• Alarms - AWS SNS

finally – you can auto scale

• Based on metrics you collect:• Go UP

• Go DOWN

• AWS Limitation: Only on one metric

• Machine Images for AutoScale

?questions?

• email.lcostea@gmail.com

• @clm160

top related