16

Scale net apps in aws

Embed Size (px)

Citation preview

Page 1: Scale net apps in aws
Page 2: Scale net apps in aws

AutoScale .NET Applications in Amazon Web Services

Start using auto scale today!

Liviu Costea @clm160Development Lead, BizPro Technologies

Page 3: Scale net apps in aws

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

Page 4: Scale net apps in aws

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)

Page 5: Scale net apps in aws

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

Page 6: Scale net apps in aws

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

Page 7: Scale net apps in aws

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)

Page 8: Scale net apps in aws

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

Page 9: Scale net apps in aws

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

Page 10: Scale net apps in aws

code 1 – not working as expected

Page 11: Scale net apps in aws

code 2 – working

Page 12: Scale net apps in aws

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

Page 13: Scale net apps in aws

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

Page 14: Scale net apps in aws

monitoring your app

• AWS CloudWatch• Standard Metrics

• Custom Metrics - PowerShell

• Alarms - AWS SNS

Page 15: Scale net apps in aws

finally – you can auto scale

• Based on metrics you collect:• Go UP

• Go DOWN

• AWS Limitation: Only on one metric

• Machine Images for AutoScale

Page 16: Scale net apps in aws

?questions?

[email protected]

• @clm160