An Introduction to Microservices Architecture BOV 1079 Rob Knight - - PowerPoint PPT Presentation

an introduction to microservices architecture
SMART_READER_LITE
LIVE PREVIEW

An Introduction to Microservices Architecture BOV 1079 Rob Knight - - PowerPoint PPT Presentation

An Introduction to Microservices Architecture BOV 1079 Rob Knight Stephen Mogg rob.knight@suse.com stephen.mogg@suse.com @rssfed23 @Stephen_mogg Agenda Where were coming from The 12 factors a mini deep dive How the


slide-1
SLIDE 1

An Introduction to Microservices Architecture

BOV 1079

Rob Knight rob.knight@suse.com @rssfed23 Stephen Mogg stephen.mogg@suse.com @Stephen_mogg

slide-2
SLIDE 2

Agenda

  • Where we’re coming from
  • The 12 factors – a mini deep dive
  • How the public cloud can help
slide-3
SLIDE 3

Where we’re coming from

3

slide-4
SLIDE 4

In Today’s Era of Digital Transformation Every company is a technology company

Business support functions Products & services partners employees customers supply chain

No longer a mere supporting actor Technology has become a driver of competitive advantage across the business

slide-5
SLIDE 5

Accelerate Delivery of Modern Applications To compete and win in the digital era STABILITY AGILITY

Increase responsiveness Speed innovation

  • Reduce cycle times, moving toward

CI/CD (increase release frequency)

  • Deliver cloud native applications that

are highly and dynamically scalable, resilient, and rapidly evolvable

slide-6
SLIDE 6

Application Delivery Transformation Journey

6

Accelerate application development and delivery Build and deliver new cloud native applications Modernize legacy applications

Best practices, patterns, processes Containerize & Orchestrate Microservices & DevOps

Containerize Modernize Repeatable Standardize

Discover & capture best practices, patterns, processes

Consistency across the enterprise

Factory-scale application production

slide-7
SLIDE 7

9

slide-8
SLIDE 8

10

slide-9
SLIDE 9

The Twelve Factors

11

slide-10
SLIDE 10

The Twelve Factors – 1 - Codebase One codebase tracked in revision control, many deploys

12

All your application code lives in one repository Small codebases. Once a different end function is created a new repository is needed Dependency management

slide-11
SLIDE 11

The Twelve Factors – 2 - Dependencies Explicitly declare and isolate dependencies

13

Never assume an app dependency is present on a host system Use built in language package managers Ship dependencies bundled into your app

slide-12
SLIDE 12

The Twelve Factors – 3 - Config Store configuration in the environment (not the code!)

14

Configuration is anything that may vary between different

  • environments. Code is all the stuff that doesn’t

Store configuration as environment variables Don’t bake credentials or dependent endpoint credentials in the code

slide-13
SLIDE 13

The Twelve Factors – 4 – Backing Services Treat backing services as attached resources

15

Backing service = anything the app consumes over the network Local and third party resources should be treated the same Loose coupling and soft failure

slide-14
SLIDE 14

The Twelve Factors – 5 – Build, Release, Run Strictly separate build, release and run phases

16

Build phase is for compiling code Release phase is combining binariries with a specific target environment configuration Separating them out allows developers to focus on compilation but the team running/operating the code have less complexities to deal with

slide-15
SLIDE 15

The Twelve Factors – 6 - Processes Execute the app as one or more stateless processes

17

Any persistent data should be stored outside of the app The state of the whole system is defined by databases and shared storage, not individual running instances Helps enable the scalability and highly available nature of “cloud native”

slide-16
SLIDE 16

The Twelve Factors – 7 – Port Binding Export services via port binding

18

The app should be completely self contained, not relying on an application or web server bundled with it Allows other apps to be the backing of other apps easily Web process is run entirely in userspace

slide-17
SLIDE 17

The Twelve Factors – 8 - Concurrency Scale out via the process model

19

One process does one thing, and does it well Factor less important these days, as rather than having one app with multiple process and scaling individual processes individually we recommend one process per service/app, and scale each component separately One element still relevant, is avoiding daemonization and relying on the container orchestrator for stream and process management (example: k8s livenessProbe)

slide-18
SLIDE 18

The Twelve Factors – 9 - Disposability

Maximize robustness with fast startup and graceful shutdown

20

Ready to serve requests as quick as possible Processes should expect to be start and stopped at a moments notice (facilitates fast elastic scaling) Be robust against sudden death

slide-19
SLIDE 19

The Twelve Factors – 10 – Dev/Prod Parity

Keep development, staging and prod as similar as possible

21

Optimise for continuous deployment by closing the gaps

Make the time gap small: a developer may write code and have it deployed hours or even just minutes later. Make the personnel gap small: developers who wrote code are closely involved in deploying it and watching its behaviour in production. Make the tools gap small: keep development and production as similar as possible.

The same backing service (type) between environments.

slide-20
SLIDE 20

The Twelve Factors – 11 – Logs

Treat logs as event streams

22

Don’t write logfiles or let the app worry about routing logs, log to stdout Allows logs to be captured by the execution environment (such as k8s)

slide-21
SLIDE 21

The Twelve Factors – 12 – Admin Processes

Run admin/management tasks as one-off processes

23

Admin processes should be run in an identical environment as production, by developers Run against a release with same codebase and config as the final production environment the admin code will run in Don’t run updates directly against a database, don’t run them from a local terminal window Avoids issues using dev vs vendored versions of python, rails, etc that may have differences Containers mitigate this somewhat and provide more flexibility. K8s has Jobs for this purpose

slide-22
SLIDE 22

How the Public Cloud can help

24

slide-23
SLIDE 23

Why Public Cloud for MicroServices?

On-demand (limitless*) resources Experiment with low cost and risk Speed Service orientation Support for Multiple Languages

* OK so there is a limit – you just have to work really hard to meet it

slide-24
SLIDE 24

Public Cloud Services – more than just VMs

Source images AWS/Microsoft

slide-25
SLIDE 25

(as a Service) – Example - Databases

Advantages of a Traditional Deployment Advantages of using DBaaS Familiar Free up Staff Existing Processes Smaller organizations can take advantage (skills / $$$) Scalability

slide-26
SLIDE 26

Kubernetes as a Service AKS, GKE and EKS

Are all completely awesome, but what if ..

  • …The CSP does not offer the version of Kubernetes you need for your

application?

  • …You goal is to replicate an on-premises deployment of K8S?
  • …You need full control over the Kubernetes master server
  • …There is is a need to test out different / newer versions of Kubernetes?
slide-27
SLIDE 27

Conclusion

30

slide-28
SLIDE 28