Cloud native applications take advantage of cloud characteristics by using microservices architectures and containers. Microservices allow each service to have a single focus, be loosely coupled, lightweight, and highly scalable. Containers enable fast, immutable deployments and optimize resource usage. Orchestration tools like Kubernetes manage containers and provide additional capabilities like networking and scaling. Observability tools provide monitoring, logging, and distributed tracing to gain insights into application performance and issues.
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
[WSO2Con Asia 2018] Architecting for Container-native Environments
1.
2.
3. Cloud native is a way of
approaching the development and
deployment of applications in such
a way that takes account of the
characteristics and nature of the
cloud - resulting in processes and
workflows that fully take
advantage of the platform.
4. Mirror the structure of the
cloud with Microservices!
Don‘t port over your app from
server hardware to the cloud!
With MS, apps are being built
as a distributed collection of
services. This pairs up with the
distributed nature of the cloud.
5.
6. ● Allows each service to have a single focus
● Loosely coupled
● Lightweight
● Highly scalable modular architecture to achieve better
resource usages
● Optimized deployment models
● Fewer maintenance costs
● Faster delivery times
7. ● Underlying the microservices architecture is the rise of
Docker and the container ecosystem.
● Managing your app as distinct services has implications on
infrastructure
● Every service in a microservices app needs to be a
self-contained unit
● Services need their own allotment of resources for
computing, memory, and networking
● This is where containers come in
8. ● Software that treats the container as
the first-class unit of infrastructure
(as opposed to, for example, treating
the physical machine or the virtual
machine as the first-class unit)
● Software that does not just “happen
to work” in, on or around containers,
but rather is purposefully designed
for containers
● https://techcrunch.com/2016/04/27
/lets-define-container-native/
9.
10. ● Commonly done with Docker containers.
● Any size applications and dependencies can be
containerized
● Over time you should aspire towards splitting suitable
applications and writing future functionality as microservices
● Real Value of containers:
○ Fast immutable deployments
○ Maximizing resource utilization
○ Bare-metal performance
13. ● Because containers alone won’t be enough
● Containers need to be managed
● Networking between containers is hard
● Containers must be scheduled, distributed and load balanced
● The data has to persist somewhere
14. ● Kubernetes is the
market-leading orchestration
solution.
● Alternatives: RedHat
OpenShift, Mesosphere
DC/OS, Hashicorp Nomad,
and Docker Swarm for
container orchestration
17. ● A chart is a collection of files that describe a related set of Kubernetes
resources.
● A single chart might be used to deploy a simple pod or a complex
application.
● WSO2 plans to implement charts for WSO2 middleware.
● Charts can be managed in Helm repositories.
https://docs.helm.sh/
18. ● Service mesh is not something
that came up with Kubernetes.
● There are two logical components
that create service mesh.
● Sidecar is the perfect example
which extends and enhances the
main container in a pod. With
service mesh, the sidecar is service
proxy or data plane.
● Service mesh control plane is the
central place to manage the
service mesh and service proxies.
19.
20. ● Istio - most comprehensive service mesh platform
○ traffic management,
○ security
○ policy enforcement etc.
○ Monitoring - Prometheus, Grafana, Heapster, and native GCP and
AWS monitoring tools,
○ Distributed tracing - Zipkin and Jaeger.
● Due to the popularity of Istio, NGINX implemented another service mesh
based on Istio called nginMesh.
● Linkerd is another popular open-source service mesh platform.
● Conduit is also a service mesh platform targeting Kubernetes.
21. MSA reduces the infrastructure
resource usage by allocating
resources at a granular level.
Nevertheless, at any given time, it
would need to run at least one
container per service. The
serverless architecture attempts
to further optimize this by
decomposing the deployable unit
up to functions and running
functions only when needed.
23. ● Serverless functions became popular when AWS introduced the AWS
Lambda platform.
● All public cloud vendors provide a similar offering, such as Google Cloud
Functions, Azure Functions, and IBM Cloud Functions.
● Users only get billed for the number of function invocations
● Apache OpenWhisk is a popular serverless framework for implementing
on-premise serverless systems.
● Fission is another popular serverless platform specifically designed for
Kubernetes.
25. ● If the system grows over time, it would require a considerable
amount of effort and repetitive work by introducing a
considerable amount of integrations.
● Ballerina is a new programming language purposely built by
WSO2 to fill this gap in the container-native ecosystem.
● It provides integration constructs and connectors for
implementing distributed system integrations.
26. ● Set up continuous integration/continuous delivery so that
changes to your source code automatically result in a new
container being built, tested and deployed in staging and
eventually to production.
Img src: https://chengl.com/docker-workflow/
27. ● A deployment model that
mandates that no
application updates,
security patches, or
configuration changes
happen on production
systems.
● If any of these needs to be
modified, a new image is
constructed, pushed and
cycled into production.
28. image source: https://www.gocd.org/2017/08/15/canary-releases/
● Incrementally apply
changes to the existing
solution without having
to completely switch the
entire deployment to
the new solution version.
● Subset of users will try it
before propagating it to
everyone.
30. ● Monitoring - Observing the
health of the applications,
including socket status, resource
usage, request counts, latencies,
etc., and generating alerts for
the operations teams
● Prometheus is a monitoring
solution based on time series
data
● Grafana allows to visualize the
data stored in Prometheus (and
other sources)
31. ● Centralized logging is crucial for
investigating issues in distributed
production environments
● Fluentd provides a unified logging
system for connecting various
sources of log data to various
destination systems
● It can be integrated with other
open-source monitoring tools,
such as Elasticsearch and Kibana,
to implement a complete solution
for monitoring service logs
https://github.com/fluent/fluentd
32. ● Distributed tracing helps provide better insights on analyzing
○ Latency bottlenecks
○ Root-cause analysis of errors
○ Resource utilization issues, etc.
● Jaeger, Zipkin, and AppDash are three popular open-source projects
33. ● Modern enterprises are now adopting microservices architecture for
implementing highly scalable applications that achieve better agility,
speed, and lower cost.
● Containers have enabled the increasing prominence of serverless
computing & microservices architectures.
● At a high level, designing container-native systems will require
technologies for container orchestration, serverless functions,
integration services, CI/CD, and observability.