2 1 Pulse. Temperature. Blood Pressure. Micro-service systems have - - PowerPoint PPT Presentation

2 1 pulse temperature blood pressure micro service
SMART_READER_LITE
LIVE PREVIEW

2 1 Pulse. Temperature. Blood Pressure. Micro-service systems have - - PowerPoint PPT Presentation

2 1 Pulse. Temperature. Blood Pressure. Micro-service systems have emergent properties too. nearForm & micro-services 50+ production systems. The good, the bad, and the ugly. What are micro-services? Independent processes that exchange


slide-1
SLIDE 1

2

slide-2
SLIDE 2

1

slide-3
SLIDE 3
  • Pulse. Temperature. Blood Pressure.

Micro-service systems have emergent properties too.

slide-4
SLIDE 4

nearForm & micro-services 50+ production systems. The good, the bad, and the ugly.

slide-5
SLIDE 5

What are micro-services? Independent processes that exchange messages.

slide-6
SLIDE 6

Messages are fundamental. Message behavior has emergent properties.

slide-7
SLIDE 7

Message flow rate. Easy to measure. Tells you a lot. Independent of services.

slide-8
SLIDE 8

Deploy a new micro-service. Does the new version break anything?

slide-9
SLIDE 9

To measure changes to services, measure changes to message flow rates.

slide-10
SLIDE 10

Micro-service message patterns. What to measure? Here’s what we’ve found useful…

slide-11
SLIDE 11

Actor. A pool of services share message load evenly (round-robin, say).

slide-12
SLIDE 12

Subscriber. Many services all listen for the same set of message types.

slide-13
SLIDE 13

Chain. An initial message causes a chain

  • f serial message steps.
slide-14
SLIDE 14

Tree. An initial message causes a flowering of child messages.

slide-15
SLIDE 15

Why? It's the risk, stupid! Monoliths put everybody in danger.

slide-16
SLIDE 16

Risk. Reduction can be measured. Leave elimination to Machiavelli.

slide-17
SLIDE 17

Our "best practices" for risk. Unit tests; code reviews; standards. Do we have good measures?

slide-18
SLIDE 18

We've just made things worse! Microservices also have emergent failure modes.

slide-19
SLIDE 19

Let's attack both sides. And we'll find a way to connect both attacks. Formal Methods “Best Practices” Measurement

slide-20
SLIDE 20

Dynamic measurement. Measure health of the system. Exposes unknown unknowns.

slide-21
SLIDE 21

Formal methods. Correctness proofs are impractical. Incomplete execution traces? FTW!

* http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html

TLA+ Leslie Lamport *

slide-22
SLIDE 22

Invariants. Some things should never change. Measure them to make sure!

slide-23
SLIDE 23

Example. E-commerce shopping cart. add-item msgs == sales-tax msgs

slide-24
SLIDE 24

Be practical! Finding invariants is hard. Use the microservice patterns to cheat.

slide-25
SLIDE 25

Actor. n actors means each actor sees 1⧸n of the messages.

slide-26
SLIDE 26

Subscriber. n subscribers means each sees n messages.

slide-27
SLIDE 27

Chain. n inbound messages over k links means n k chained messages.

slide-28
SLIDE 28

Tree. n inbound messages over k leaves means n k leaf messages.

slide-29
SLIDE 29

Look for cause/effect relationships. These are by design! Validate your message patterns in production. “ask not what can go wrong, ask what must go right…” Chris Newcombe, AWS*

* http://research.microsoft.com/en-us/um/people/lamport/tla/amazon.html

slide-30
SLIDE 30

When should you rollback? Invariants should be the same before and after deployment.

slide-31
SLIDE 31

Is the system correct? Business rules are invariants too! Express as message relationships.

slide-32
SLIDE 32

Are you about to be blindsided? Combine individual indicators to get a deeper measure of risk.

slide-33
SLIDE 33

Measure what counts. Find invariants. Measure them. Follow: senecajs.org

slide-34
SLIDE 34

Thank You! Richard Rodger @rjrodger nearform.com