java microservices at scale today and tomorrow

25
Java microservices at scale or, why Spring PCF

Upload: spring-by-pivotal

Post on 21-Jan-2018

595 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Java microservices at scale today and tomorrow

Java microservices at scale

or, why Spring PCF

Page 2: Java microservices at scale today and tomorrow

Nice to meet you

• JVM* ?

• C/C++/.NET?

• Python?

• JS/Node?

• Classic 3 tier?

• Modular monoliths?

• Cloud Natives?

Page 3: Java microservices at scale today and tomorrow

Economies of scope

SHARED

FUNCTIONCROSS

SELLING

OUTPUT TO

INPUT

https://hbr.org/1983/11/plan-for-economies-of-scope

Page 4: Java microservices at scale today and tomorrow

Ability to hire vs. cost of diversity

Eachlanguage

N + 1 build systems, at least

N + 1 dependency mgt systems, or none

N + 1 platform options, at least

N + 1 toolchains, documentation situation

N + 1 database options, at least

N + 1 developer hiring market dynamic

N + 1 docs, open source ecosystem

Page 5: Java microservices at scale today and tomorrow

Cloud Native Platform for Java

• Microservice Infra Automation

• Infra Automation Boilerplate

• App Coordination Boilerplate

• App Config Boilerplate

• App Boilerplate

Page 6: Java microservices at scale today and tomorrow
Page 7: Java microservices at scale today and tomorrow

12 Factor Apps

Boot makes 12+ factor style apps

easy. Microservices is lots of:

• Property Configuration

• Port Binding

• Connecting to Backing Services

• Logging

I. One Codebase, One App

II. Dependency Management

V. Build, Release, Run

XI. Logs

IX. Disposability

IV. Backing Services

X. Environmental Parity

XII. Administrative Process

VII. Port Binding

VI. Process

VIII. Concurrency

III. Configuration

Page 8: Java microservices at scale today and tomorrow

Java Buildpack (4.x +)

- Self executable JAR / Java main()

- Advanced memory calculator

- JVM heap dump histograms

- Spring Boot CLI apps

- Robust 3rd party framework support

Page 9: Java microservices at scale today and tomorrow

Spring Boot @Profile

- Automatic enablement of

“cloud” @Profile

- Any @Configuration

class in this profile will be

automatically applied

- No recompile required to

adapt to deployment env

Page 10: Java microservices at scale today and tomorrow

Apps Manager and Spring Boot

Actuator integration into Apps Manager

– Transparent security integration with Pivotal Cloud Foundry UAA

– Eye-catcher to indicate it’s a boot application

– Change log level at runtime

– /health information

– build & Git /info

– /dump and /heapdump

– /trace for recent HTTP requests

Page 11: Java microservices at scale today and tomorrow

Demo

Page 12: Java microservices at scale today and tomorrow
Page 13: Java microservices at scale today and tomorrow

13

Container to Container Networking

Improve on ASG experience

■ Support for multiple TCP/UDP ports

■ Enables microservice discovery, client LB

■ Avoid expensive trip through LB/FW

■ Order of magnitude latency reduction

■ Allow SDN traffic like VMware NSX

■ Support for “Zero Trust” security posture

B

C

A

Firewall rules at application level

Page 14: Java microservices at scale today and tomorrow

14

Spring Cloud / Spring Cloud Services

Dev Desktop

DEV

Wider scope

PROD

Just the key svcs

Page 15: Java microservices at scale today and tomorrow

15

SCS Configuration Server

No downtime app config updates, inspired by NetflixOSS Archaius

app Cgreeting: hi

app Bgreeting: hi

app Agreeting: hi

Config Server2. Source config

1. Push config

1. Pull config

Hashicorp VaultGit Source Repos

greeting: hi

2. API keys, secrets

Page 16: Java microservices at scale today and tomorrow

16

SCS Service Registry

NetflixOSS Eureka Intelligent Routing Foundation

Service Registry

ConsumerProducer

1. register2. discover

3. connect

Service Registry

Service Registry

Service Registry

Page 17: Java microservices at scale today and tomorrow

17

SCS Circuit Breaker (NetflixOSS Hystrix)

Compensating transactions library, real time monitoring dashboard

Closedon call / pass through

call succeeds / reset countcall fails / count failure

threshold reached / trip breaker

Half-Openon call / pass throughcall succeeds / reset

call fails / trip breaker

Openon call / fail

on timeout / attempt reset

trip

breakerreset

attempt

reset

trip

breaker

Page 18: Java microservices at scale today and tomorrow

Demo

Page 19: Java microservices at scale today and tomorrow

19

PCF Metrics: Zipkin Distributed Tracing

Distributed call graph & visually correlated logs with Trace Explorer

Understand failures and latency in

microservice architecture

• Spring Cloud Sleuth integration

• View correlated logs to time window

• Interactive, graphical displays of

request traffic through an app

• Visualize and filter metrics by AI

• Integrated with PCF UAA Security

• Your custom Spring Boot /metrics

automatically display as graphs

Page 20: Java microservices at scale today and tomorrow

20

Microservice Health and Performance

Network metrics: HTTP req/err, and

avg latency (every second)

Container metrics: CPU, disk, and

memory (every 30 seconds)

App events: create, update, start, stop,

crash (on occurrence)

Shows app developers a real-time view of data

Page 21: Java microservices at scale today and tomorrow

Looking ahead

Page 22: Java microservices at scale today and tomorrow

Safe Harbor

The following is intended to outline the general direction of Pivotal'sofferings. It is intended for information purposes only and may not be incorporated into any contract. Any information regarding pre-release of Pivotal offerings, future updates or other planned modifications is

subject to ongoing evaluation by Pivotal and is subject to change. This information is provided without warranty or any kind, express or

implied, and is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing

decisions regarding Pivotal's offerings. These purchasing decisions should only be based on features currently available. The

development, release, and timing of any features or functionality described for Pivotal's offerings in this presentation remain at the sole

discretion of Pivotal. Pivotal has no obligation to update forward looking information in this presentation.

Page 23: Java microservices at scale today and tomorrow

Spring Cloud Data Flow for PCF

Add Spring Cloud Data Flow to the marketplace

• Deployment/lifecycle management for SCDF Server

• Default data services are MySQL, RabbitMQ, and Redis

PCF tiles

• Ability to change data services to User Provided Services

• Support for resolving Spring Cloud Stream applications from

a customer-managed Maven artifact repository (e.g. JFrog

Artifactory tile)

• Integration with PCF UAA for single-sign on from SCDF

Shell

• SCDF UI as Service Dashboard in PCF Apps Manager

Page 24: Java microservices at scale today and tomorrow

Spring Cloud Services 1.5

SCS Service Instance Sharing

Allow SCS service instances to be shared across orgs and spaces.

• Customers often align CF Orgs/Spaces around team structures.

• Microservices architectures are typically created by multiple independent teams.

• Teams often want/need to share SI’s across team boundaries (e.g. service registries) to support collaboration.

• Current multi-DC registry solution is suboptimal for this use case, and only supports Eureka.

With Service Sharing, an organization could support more teams/divisions with a lower number of AI backing SCS service instances across many orgs/spaces.

Targeting deployment to PCF 1.9+.

Page 25: Java microservices at scale today and tomorrow