SlideShare a Scribd company logo
Designing Modern
Web Applications
by
Lucas Carlson
Programmer
18 Years
Author
• Ruby Cookbook
• Programming for PaaS
Entrepreneur
• AppFog PaaS
• Mog Music Streaming Service
Current Role
• Chief Innovation Officer at
CenturyLink
Who Am I?
Structure
1
Who Am I?
2
What’s Wrong
With Legacy Web
Architectures?
3
How to Design a
Modern Web
Application
4
The 6 Worst
Web Practices and
How to Avoid Them
5
Getting the
Most From the
Cloud
6
Conclusions
What’s Wrong With
Legacy Web Architectures?
If it ain’t broke, don’t fix it… right?
Legacy Web Architectures
Web
Server
2b
5
Application
Server
AppThena
Web App
Other
Web App
Other
Web App
Other
Web App
53
Database
Server
4
Data
CSS
Images
Pages
2a
BROWSE
R
Legacy Web Architectures
Web
Server
2b
5
Application
Server
AppThena
Web App
Other
Web App
Other
Web App
Other
Web App
53
Database
Server
4
Data
CSS
Images
Pages
BROWSE
R
Browser
6
Web
Server
2b
5
Application
Server
AppThena
Web App
Other
Web App
Other
Web App
Other
Web App
53
Database
Server
4
Data
CSS
Images
Pages
Legacy Web Architectures
Limited
Redundancy
Error 500
Legacy Web Architectures
Web
Server
Application
Server
AppThena
Web App
Other
Web App
Other
Web App
Other
Web App
53
Database
Server
4
Data
CSS
Images
Pages
BROWSE
R
Legacy Web Architectures
Web
Server
Application
Server
AppThena
Web App
Other
Web App
Other
Web App
Other
Web App
53
Database
Server
4
Data
CSS
Images
Pages
BROWSE
R
Legacy Web Architectures
Browser
6
Web
Server
Application
Server
AppThena
Web App
Other
Web App
Other
Web App
Other
Web App
53
Database
Server
4
Data
CSS
Images
Pages
Limited
Scale
Error 500
Limited
Scale
Legacy Web Architectures
1
5
Browser
6
Web
Server
5
2b
5
Application
Server
AppThena
Web App
Other
Web App
Other
Web App
Other
Web App
53
Database
Server
4
Data
CSS
Images
Pages
2a
Error 500
Legacy Web Architectures
3-Tier
Systems
Scale…
Up to a Point
Databases are
limited
by disk size and
IO rates
Applications
are limited
by RAM and CPU
As they get
more complex,
they end up
breaking
Legacy Web
Architectures are
How to Design a
Modern Web Application
What’s the opposite of
fragile?
Hint: It’s not robustness
What’s the opposite of
fragile?
Answer : Antifragile
Anti-fragile
Definition
Examples
Break under
stress
Don’t care about
stress
Grow under
stress
The “Heart of Africa”
Characteristics
Monolithic Decentralized
Tightly coupled Loosely coupled
Heavyweight Lightweight
Complicated Simple
No redundancy Extra redundancy
AgileSluggish
Locked-in Interoperable
Anti-fragile
actively randomly kills
its own servers to
ensure its architectural
anti-fragility
Web Architectures Are Changing
To lightweight
distributed share-
nothing systems
From heavy
monolithic
backend systems
Legacy Web Architectures
Web
Server
Application
Server
AppThena
Web App
Other
Web App
Other
Web App
Other
Web App
53
Database
Server
4
Data
CSS
Images
Pages
BROWSE
R
Modern Web Architectures
App App App App
Load
Balancer
DB DB
BROWSE
R
Worker Worker
Load
Balancer
Message Bus / Distributed Service Discovery
Resiliency
App App App App
Load
Balancer
DB DB
BROWSE
R
Worker Worker
Load
Balancer
Message Bus / Distributed Service Discovery
The 6 Worst Web Practices
and How to Avoid Them
Bad Practice #1:
Synchronicity
 3-Tier Systems are like synchronous information factory lines
 If one area chokes, the entire system fails
 Usually leads to complex logical units
Bad Practice #2:
Dependency on Filesystems
 State data (sessions, uploaded
files, etc) stored on hard drives is
very hard to scale
 Requires NFS or equivalent which
are complex and chatty
 Lock you into monolithic coding
practices
Bad Practice #3:
Heavy Server-Side Processing
 Generating all the HTML server-
side made sense when client
hardware was slow
 No REST/JSON/Javascript
 All the information from a request
needs to be compiled before
returning any data
Bad Practice #4:
Expecting Services to Always Be Available
 Designing for Success is Failure
 Cloud infrastructure has higher
failure rates than dedicated
hardware
 Disaster recovery can be slow
and prone to errors
Bad Practice #5:
Moving to the Cloud without a Plan
 Cloud migration is often thought
of as simply a cost issue, not a
technical one
 Higher failure rates in cloud
infrastructure will break fragile
applications
 Migrations without a good plan
can cost a lot of unexpected
time and money
Bad Practice #6:
Lack of Redundancy
 All single points of failure are
terrible monsters (DNS, Load
Balancers, Network, etc.)
 Not only choke points, but can
take down an otherwise robust
system
 All your eggs in one basket
Designing Modern Web Applications
Good Practice #1:
Asynchronous Processes
 Small decoupled apps
 Communicate through a queue,
REST APIs, or a message bus
 Each one should do one thing very
well: simple and specialized
Good Practice #2:
Distributed Object Storage
 Memcached, Redis, MongoDB,
CouchDB, etc.
 Use instead of filesystems in legacy
web applications (sessions, file
uploads, etc.)
 Consider replacing or caching the
largest and fastest growing relational
database tables with object storage
Good Practice #3:
Micro-Services
 Leverage increased CPU capacity on
browsers with client-side Javascript
• AngularJS, Ember, Backbone
 Simple and specialized REST APIs
• Java: Spring, Spark, Jersey
• .NET: WCF, OpenRasta
• Ruby: Sinatra
• Python: Flask, Bottle
• PHP: Slim
 BONUS: Power your mobile apps
Good Practice #4:
Architecting for Failure
 Think about anti-fragility upfront
 Pro-actively stress your system
and study how it fails (not just load
testing, think of Netflix’s chaos
monkey)
 Make all failures an opportunity to
eliminate bottlenecks, increase
redundancies and prepare for the
unexpected
Good Practice #5:
Use Cloud Migration as an Opportunity to
Modernize Architecture
 Don’t half-do it
 Not all applications will do well in cloud
environments
 Automation is vital in cloud environments
where infrastructure isn’t reliable, traditional
IT can’t respond quickly enough
Good Practice #6:
Redundancy Everywhere
 Audit every area of your application
for redundancy
 2x or 3x redundancy is not enough
(the failure of one or two will over-
load and choke the remaining
systems)
 Google’s rule of thumb is for 5x
redundancy
 Be like the Hydra, kill one head and
grow two in its spot
Getting the Most From the Cloud
Portfolio of Cloud Services
EASY
HARD
 SaaS and Cloud Managed
Services
 IaaS and PaaS
 DevOps and Orchestration
SaaS and Cloud Managed Services
Errors
Exceptional, Airbrake
Analytics
Statsmix, NewRelic,
Blitz
Other
Zerigo, CloudFlare,
Recurly, Stripe
Mobile
Urban Airship, Pusher,
Realtime.io
Data
ClearDB, Amazon
RDS, Heroku
Postgres, MongoLab
Search
Searify, Websolr, AWS
CloudSearch
Email
Mailgun, Sendgrid,
CloudMailin
Logging
Loggly, Logentries,
Papertrail
Background
Tasks
Iron.io, CloudAMQP
IaaS and PaaS
 Heroku
 AppFog
 Cloud Foundry
 OpenShift
 Google App Engine
 Azure
IaaS PaaS
 AWS
 Google
 Azure
 DigitalOcean
 Rackspace
 CenturyLink Cloud
DevOps and Orchestration
 Apache
Mesos/Mesosphere
 Kubernetes
 CoreOS Fleet
 OpenStack Heat
 Chef
 Puppet
 SaltStack
 Ansible
 ZooKeeper
DevOps Orchestration
What’s Orchestration?
Designing Modern Web Applications
API-Driven Automation Built on Top of
DevOps Tools for Declaratively Deploying
Complex Cloud Apps
Orchestration :
Before Orchestration
Application
Job Scheduling
Engine
Job
Worker
Job
Worker
Job
Worker
Job
Worker
Database
After Orchestration
Orchestration API
Job Scheduling
Engine
App App DB
Job
Worker
Modern App Architecture
Orchestration API
Job Scheduling
Engine
App App DB
Job
Worker
App App
Load
Balancer
DB Worker
Load
Balancer
Message Bus / Distributed
Service Discovery
Conclusions
Conclusions
1. Legacy web architectures are
fragile
2. Think about anti-fragility (not
scalability) up-front
3. Micro-services are the anti-fragile
future:
 Lightweight distributed
 Share-nothing systems built with
APIs
1
2
3
Thank You!
@cardmagic
LucasCarlson.com

More Related Content

PPTX
Design patterns for scaling web applications
PPTX
Kafka at Scale: Multi-Tier Architectures
PDF
Performance management
PPTX
Give your microservices a bus ride with MassTransit
PPTX
URP? Excuse You! The Three Kafka Metrics You Need to Know
PPTX
Latency - The King of the Mobile Experience
PPTX
DotNext 2017 in Moscow - .NET Core Networking stack and Performance -- Karel ...
PPTX
Rust and Redis - Solving Problems for Kubernetes by Ravi Jagannathan of VMwar...
Design patterns for scaling web applications
Kafka at Scale: Multi-Tier Architectures
Performance management
Give your microservices a bus ride with MassTransit
URP? Excuse You! The Three Kafka Metrics You Need to Know
Latency - The King of the Mobile Experience
DotNext 2017 in Moscow - .NET Core Networking stack and Performance -- Karel ...
Rust and Redis - Solving Problems for Kubernetes by Ravi Jagannathan of VMwar...

What's hot (20)

PPTX
Redgate Database Devops Demo webinar - Visual Studio Team Services - 21st Fe...
PDF
A Practical Guide to Selecting a Stream Processing Technology
PPT
7 Stages of Scaling Web Applications
PPTX
NGINX MRA Fabric Model Release and Ask Me Anything Part 4
PDF
Dimitri Bellini and Pietro Antonacci - Manage Zabbix Proxies in Remote Networ...
PPTX
Outsmarting Merge Edge Cases in Component Based Design
PDF
Store
PDF
Building & Testing Scalable Rails Applications
PDF
Load balancing: from complexity to commodity
PDF
Common Patterns of Multi Data-Center Architectures with Apache Kafka
PPTX
Using Redis as Distributed Cache for ASP.NET apps - Peter Kellner, 73rd Stre...
PPTX
Metrics are Not Enough: Monitoring Apache Kafka / Gwen Shapira (Confluent)
PDF
Altitude San Francisco 2018: HTTP Invalidation Workshop
PDF
Optimizing IT Infrastructure For Peak Database Performance
PDF
Scalable and Reliable Logging at Pinterest
PDF
2 networking
PDF
7 configuration management
PDF
ASP.NET Scalability - VBUG London
PPTX
RedisConf17 - Roblox - How Roblox Keeps Millions of Users Up to Date with Red...
PPTX
Testing Below the Application
Redgate Database Devops Demo webinar - Visual Studio Team Services - 21st Fe...
A Practical Guide to Selecting a Stream Processing Technology
7 Stages of Scaling Web Applications
NGINX MRA Fabric Model Release and Ask Me Anything Part 4
Dimitri Bellini and Pietro Antonacci - Manage Zabbix Proxies in Remote Networ...
Outsmarting Merge Edge Cases in Component Based Design
Store
Building & Testing Scalable Rails Applications
Load balancing: from complexity to commodity
Common Patterns of Multi Data-Center Architectures with Apache Kafka
Using Redis as Distributed Cache for ASP.NET apps - Peter Kellner, 73rd Stre...
Metrics are Not Enough: Monitoring Apache Kafka / Gwen Shapira (Confluent)
Altitude San Francisco 2018: HTTP Invalidation Workshop
Optimizing IT Infrastructure For Peak Database Performance
Scalable and Reliable Logging at Pinterest
2 networking
7 configuration management
ASP.NET Scalability - VBUG London
RedisConf17 - Roblox - How Roblox Keeps Millions of Users Up to Date with Red...
Testing Below the Application
Ad

Similar to Designing Modern Web Applications (20)

PPTX
Cloud First Architecture
PDF
Evolving to Cloud-Native - Nate Schutta 2/2
PDF
Ask The Architect: RightScale & AWS Dive Deep into Hybrid IT
PDF
Evolving to Cloud-Native - Nate Schutta (2/2)
PDF
Cloud Migration Cookbook: A Guide To Moving Your Apps To The Cloud
PPTX
Cloud workload guidelines
PDF
Making IT Simple: A Pragmatic Approach to Cloud Computing
PDF
SaaS Application Scalability: Best Practices from Architecture to Cloud Infra...
PDF
GHC17 Abstract: From Monolith to Microservices
PDF
Modern times - architectures for a Next Generation of IT
PDF
Cloud the path forward
PPTX
Cf summit2014 roadmap
PDF
eNovance Make Your Cloud
PDF
"Portrait of the developer as The Artist" Lockheed Architect Workshop
PDF
Benno Zollner - Reshaping IT
PPTX
How to get cloud architecture and design right the first time 2012
PPTX
Cloud Foundry Roadmap (Cloud Foundry Summit 2014)
PDF
Cloud Infrastructure Modernisation Guide
PDF
Evolving to Cloud-Native - Anand Rao
PPTX
Cloud to hybrid edge cloud evolution Jun112020.pptx
Cloud First Architecture
Evolving to Cloud-Native - Nate Schutta 2/2
Ask The Architect: RightScale & AWS Dive Deep into Hybrid IT
Evolving to Cloud-Native - Nate Schutta (2/2)
Cloud Migration Cookbook: A Guide To Moving Your Apps To The Cloud
Cloud workload guidelines
Making IT Simple: A Pragmatic Approach to Cloud Computing
SaaS Application Scalability: Best Practices from Architecture to Cloud Infra...
GHC17 Abstract: From Monolith to Microservices
Modern times - architectures for a Next Generation of IT
Cloud the path forward
Cf summit2014 roadmap
eNovance Make Your Cloud
"Portrait of the developer as The Artist" Lockheed Architect Workshop
Benno Zollner - Reshaping IT
How to get cloud architecture and design right the first time 2012
Cloud Foundry Roadmap (Cloud Foundry Summit 2014)
Cloud Infrastructure Modernisation Guide
Evolving to Cloud-Native - Anand Rao
Cloud to hybrid edge cloud evolution Jun112020.pptx
Ad

Recently uploaded (20)

PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Electronic commerce courselecture one. Pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
Cloud computing and distributed systems.
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
Understanding_Digital_Forensics_Presentation.pptx
20250228 LYD VKU AI Blended-Learning.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Big Data Technologies - Introduction.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Electronic commerce courselecture one. Pdf
Review of recent advances in non-invasive hemoglobin estimation
“AI and Expert System Decision Support & Business Intelligence Systems”
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Cloud computing and distributed systems.
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Spectroscopy.pptx food analysis technology
Spectral efficient network and resource selection model in 5G networks
Per capita expenditure prediction using model stacking based on satellite ima...
Programs and apps: productivity, graphics, security and other tools
The Rise and Fall of 3GPP – Time for a Sabbatical?

Designing Modern Web Applications