Beruflich Dokumente
Kultur Dokumente
43
Availability
Reactive Microservices Requirements
Inter-service Communication
UPDATED BY MATT RASBAND - ORIGINAL BY EUGENE CIURANA
SCALABILITY
Its the property of a system or application to handle bigger
amounts of work, or to be easily expanded, in response to
increased demand for network, processing, database access, or
Figure 2: Virtualization
file system resources.
C
FAST
M
TRACK
Y
APPLICATION
PERFORMANCE
CM
MY
CY
Elevate IT Operations with APM
Figure 1: Horizontal scale
CMY
www.bmc.com/TrueSightAPM
K
VERTICAL SCALABILITY
A system scales vertically, or up, when its expanded by adding
processing, main memory, storage, or network interfaces to
a node to satisfy more requests per system. Hosting services
DOWNTIME IN DOWNTIME VENDOR As requests increase during a busy period, more nodes can
AVAILABILITY %
MINUTES PER YEAR JARGON be automatically added to a cluster to scale out and removed
90 52,560.00 36.5 days one nine
when the demand has faded similar to seasonal hiring at brick
and mortar retailers. Additionally, system resources can be re-
99 5,256.00 4 days two nines allocated to better support a system for scaling up dynamically.
99.9 525.60 8.8 hours three nines
Levels of availability
Minimum
Target
Uptime
Network
Power Figure 3: Load balancing, abstracting a more complicated scaled system
Maintenance windows
Scheduling rules are algorithms for determining which server
Serviceability must service a request. Web applications and services are
Performance and metrics typically balanced by following round robin scheduling rules,
but can also balance based on least-connected, IP-hash, or
Billing
Payload switching: Sends requests to different servers based Write-behind: Updated entries are marked in the cache
on URI, port, and/or protocol. table as dirty and its updated only when a dirty datum is
Priority activation: Adds standing by servers to the pool. requested.
Rate shaping: Ability to give different priority to different traffic. No-write allocation: Only read requests are cached under
the assumption that the data wont change over time but
Scripting: Reduces human interaction by implementing its expensive to retrieve.
programming rules or actions.
APPLICATION CACHING
SSL termination: Hardware-assisted encryption frees web
Implicit caching happens when there is little or no
server resources.
programmer participation in implementing the caching.
TCP buffering and offloading: Throttle requests to servers in The program executes queries and updates using its
the pool. native API and the caching layer automatically caches
the requests independently of the application. Example:
GZIP compression: Decreases transfer bandwidth utilization.
Terracotta (terracotta.org).
WEB CACHING
Web caching is used for storing documents or portions of
documents (particles) to reduce server load, bandwidth usage,
and lag for web applications. Web caching can exist on the
browser (user cache) or on the server, the topic of this section.
Web caches are invisible to the client may be classified in any of
Figure 7: Load balancing cluster
these categories:
Web accelerators: they operate on behalf of the server of Load-balancing cluster (active/active): Distribute the load
origin. Used for expediting access to heavy resources, like among multiple back-end, redundant nodes. All nodes in the
media files, and are often geolocated closer to intended cluster offer full-service capabilities to the consumers and are
recipients. Content distribution networks (CDNs) are an active at the same time.
example of web acceleration caches; Akamai, Amazon S3,
High availability cluster (active/passive): Improve services
and Nirvanix are examples of this technology.
availability by providing uninterrupted service through redundant
Proxy caches: they serve requests to a group of clients clusters that eliminate single points of failure. High availability
that may all have access to the same resources. They can clusters require two nodes at a minimum, a heartbeat to detect
be used for content filtering and for reducing bandwidth that all nodes are ready, and a routing mechanism that will
usage. Squid, Apache, Amazon Cloud Front, and ISA server automatically switch traffic, or fail over, if the main cluster fails.
are examples of this technology.
DISTRIBUTED CACHING
Caching techniques can be implemented across multiple
systems that serve requests for multiple consumers and from
multiple resources. These are known as distributed caches, like
the setup in Figure 6. Akamai is an example of a distributed
Figure 8: Cluster failover
web cache, and memcached is an example of a distributed
application cache. Grid: Process workloads defined as independent jobs that dont
require data sharing among processes. Storage or network may
be shared across all nodes of the grid, but intermediate results
have no bearing on other jobs progress or on other nodes in
the grid, such as a Cloudera Map Reduce cluster (cloudera.com).
Some stateful applications may only scale up; the A/P cluster in Figure 12: Cloud computing configuration
Figure 11 provides uninterrupted service and disaster recovery
for such an application. Active/Active configurations provide CLOUD SERVICES TYPES
failure transparency. Active/Passive configurations may provide
Web services: Salesforce com, USPS, Google Maps.
failure transparency at a much higher cost because automatic
failure detection and reconfiguration are implemented through Service platforms: Google App Engine, Amazon Web
a feedback control system, which is more expensive and trickier Services (EC2, S3, Cloud Front), Nirvanix, Akamai,
to implement. MuleSource.
A B O U T T H E AU T H O R
MATT RASBAND is a software engineer with a favoritism toward the back end and distributed systems.
He has worked in the financial services industry in a number of capacities, from Financial Advisor to Team
Lead and Senior Software Engineer. Over his career he led a multi-billion dollar company from a monolithic
application to a microservices architecture. When he isnt writing Java or Python, or learning something new,
he can be found in the mountains of Colorado sipping coffee, mountain biking, and spending time with his
wife and their high-energy toddler.
DZone communities deliver over 6 million pages each month to more than 3.3 million
software developers, architects and decision makers. DZone offers something for
everyone, including news, tutorials, cheat sheets, research guides, feature articles, DZONE, INC. REFCARDZ FEEDBACK
150 PRESTON EXECUTIVE DR. WELCOME
source code and more. refcardz@dzone.com
CARY, NC 27513
"DZone is a developer's dream," says PC Magazine. SPONSORSHIP
888.678.0399 OPPORTUNITIES
Copyright 2017 DZone, Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval 919.678.0300 sales@dzone.com
system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior
written permission of the publisher.