managing micro-services with neo4j

80
10.21.15 Managing Microservices with Neo4j

Upload: rob-schoening

Post on 10-Feb-2017

1.227 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Managing micro-services with neo4j

10.21.15

Managing Microservices with Neo4j

Page 2: Managing micro-services with neo4j

World’s largest credit marketplacePeer-to-peer personal loans Small business loans Medical financing

@lendingclub @ashleycsun @rschoening [email protected] [email protected]

Page 3: Managing micro-services with neo4j

Microservices

Page 4: Managing micro-services with neo4j

all the cool kids are doing it

Microservices

Page 5: Managing micro-services with neo4j

2013 2015

Page 6: Managing micro-services with neo4j
Page 7: Managing micro-services with neo4j

Because no talk on microservices would be complete without a container analogy

Page 8: Managing micro-services with neo4j
Page 9: Managing micro-services with neo4j

Can you check the load balancer?

Page 10: Managing micro-services with neo4j

How do we do it?

Page 11: Managing micro-services with neo4j
Page 12: Managing micro-services with neo4j

That’s not a joke

Page 13: Managing micro-services with neo4j

Let’s explain

Page 14: Managing micro-services with neo4j

Separated at Birth

Page 15: Managing micro-services with neo4j

Integrations

Page 16: Managing micro-services with neo4j

MacGyver

Page 17: Managing micro-services with neo4j

MacGyver

GitHub

Pager Duty

Jira

AWS

HipChatSplunk

Page 18: Managing micro-services with neo4j

MacGyver

GitHub

Pager Duty

Jenkins

Jira

AWS

New RelicGraphite

HipChatConfluence

Splunk

Page 19: Managing micro-services with neo4j

MacGyver

GitHub

SAN Storage

Pager Duty

Jenkins

Jira

AWS

New Relic

Active Directory

Graphite

HipChatConfluence

VMWare

Splunk

CloudStack

Page 20: Managing micro-services with neo4j

MacGyver

GitHub

SAN Storage

Load Balancer

Pager Duty

Jenkins

Jira

AWS

New Relic

Active Directory

Graphite

HipChatConfluence

VMWare

SplunkCatchpoint

Artifactory

Firewall

CloudStack

Page 21: Managing micro-services with neo4j

Operational Data Is Distributed

Page 22: Managing micro-services with neo4j

Operational Data Is Distributed

but real-time access is costly

Page 23: Managing micro-services with neo4j

Get It Together

Page 24: Managing micro-services with neo4j

Desired Database Characteristics

Near Real Time Low Latency Read Join Across Data Sets Ease of Use Ad Hoc Query

Page 25: Managing micro-services with neo4j

Desired Database Characteristics

Near Real Time Low Latency Read Join Across Data Sets Ease of Use Ad Hoc Query

Page 26: Managing micro-services with neo4j

How do we use it?

Page 27: Managing micro-services with neo4j

App Check-In and

Service Discovery

Page 28: Managing micro-services with neo4j

Problem: Keeping track of many rapidly-changing services

Page 29: Managing micro-services with neo4j

Problem: Keeping track of many rapidly-changing services

Solution: All app servers phone home to MacGyver and are stored in Neo4j as ‘App Instance’ nodes

Page 30: Managing micro-services with neo4j

MacGyver

Neo4j

App Instance

App Instance

App Instance

Page 31: Managing micro-services with neo4j

MacGyver

Neo4j

App Instance

App Instance

App Instance

<<REST>> <<REST>>

Page 32: Managing micro-services with neo4j

Real-time database of deployed infrastructure

Page 33: Managing micro-services with neo4j

Real-time database of deployed infrastructure

New services get auto-discovered by MacGyver

Page 34: Managing micro-services with neo4j

Real-time database of deployed infrastructure

New services get auto-discovered by MacGyver

Low maintenance

Page 35: Managing micro-services with neo4j

Real-time database of deployed infrastructure

New services get auto-discovered by MacGyver

Low maintenance

Easy scalability

Page 36: Managing micro-services with neo4j

Real-time database of deployed infrastructure

New services get auto-discovered by MacGyver

Low maintenance

Easy scalability

Low latency ad hoc query capability

Page 37: Managing micro-services with neo4j

“Show me all the instances of app X in environment Y”

Page 38: Managing micro-services with neo4j

“Show me all the instances of app X in environment Y”

Page 39: Managing micro-services with neo4j

Deployment and Release Automation

Page 40: Managing micro-services with neo4j

Problem: Highly manual and tedious releases

Page 41: Managing micro-services with neo4j

Problem: Highly manual and tedious releases Limited service visibility

Page 42: Managing micro-services with neo4j

Problem: Highly manual and tedious releases Limited service visibility

• What pool should I deploy to? • Is the most recent revision ‘live’ right now? • Are live pool revisions in sync in different

environments?

Page 43: Managing micro-services with neo4j

Problem: Highly manual and tedious releases Limited service visibility

Solution: Utilize app check-ins and Neo4j to expose info about live

and dark pools, enabling us to automate deployments in a release

Page 44: Managing micro-services with neo4j

Blue-Green Deployment

“Live” Pool “Dark” Pool

Server 1

Server 2

Server 3

Server 5

Server 7

Server 4 Server 8

Server 6

Service Group

Page 45: Managing micro-services with neo4j

Blue-Green Deployment

“Live” Pool “Dark” Pool

Server 1

Server 2

Server 3

Server 5

Server 7

Server 4 Server 8

Server 6

DEPLOY

Service Group

Page 46: Managing micro-services with neo4j

Blue-Green Deployment

“Draining” Pool

Server 1

Server 2

Server 3

Server 5

Server 7

Server 4 Server 8

Server 6

DEPLOY

Service Group

Page 47: Managing micro-services with neo4j

Blue-Green Deployment

Pool Cut-Over

Server 1

Server 2

Server 3

Server 5

Server 7

Server 4 Server 8

Server 6

DEPLOY

Service Group

Page 48: Managing micro-services with neo4j

Blue-Green Deployment

Dark Pool Live Pool

Server 1

Server 2

Server 3

Server 5

Server 7

Server 4 Server 8

Server 6

Service Group

Page 49: Managing micro-services with neo4j

App Instance

MacGyver

Neo4j

<<update app instance>>

Page 50: Managing micro-services with neo4j

Virtual Server

MacGyver

Neo4j

<<REST API Polling>> Load Balancer

Page 51: Managing micro-services with neo4j

Virtual Server

MacGyver

Neo4j

<<REST API Polling>> Load Balancer

<<update virtual server>>

Page 52: Managing micro-services with neo4j

Application Pools

Page 53: Managing micro-services with neo4j

Virtual Service

Page 54: Managing micro-services with neo4j

Problem: Highly manual and tedious releases Limited service visibility

• What pool should I deploy to? • Is the most recent revision ‘live’ right now? • Are live pool revisions in sync in different

environments?

Page 55: Managing micro-services with neo4j

What pool should I deploy to?

Page 56: Managing micro-services with neo4j

What pool should I deploy to?

Page 57: Managing micro-services with neo4j

Are live pool revisions in sync in different environments?

Page 58: Managing micro-services with neo4j

Are live pool revisions in sync in different environments?

Page 59: Managing micro-services with neo4j

Do multiple revisions exist within a single pool?

Page 60: Managing micro-services with neo4j

Do multiple revisions exist within a single pool?

Page 61: Managing micro-services with neo4j
Page 62: Managing micro-services with neo4j

MacGyver

Neo4j

<<REST API>> Load Balancer

<<REST API>>

App Instance

App Instance

App Instance

Page 63: Managing micro-services with neo4j

MacGyver

Neo4j

<<REST API>> Load Balancer

<<REST API>>

App Instance

App Instance

App Instance

Page 64: Managing micro-services with neo4j

Infrastructure Mapping

Page 65: Managing micro-services with neo4j

Problem: Limited visibility into infrastructure interdependencies

Page 66: Managing micro-services with neo4j

Problem: Limited visibility into infrastructure interdependencies

Solution: Use Neo4j to connect different components of our infrastructure

Page 67: Managing micro-services with neo4j
Page 68: Managing micro-services with neo4j

Are any servers in a live pool degraded?

Page 69: Managing micro-services with neo4j

Are any servers in a live pool degraded?

Page 70: Managing micro-services with neo4j
Page 71: Managing micro-services with neo4j

Do we have a single point of failure among any of our services?

Page 72: Managing micro-services with neo4j

Do we have a single point of failure among any of our services?

Page 73: Managing micro-services with neo4j
Page 74: Managing micro-services with neo4j

If storage volume #3 goes down, what services will be impacted?

Page 75: Managing micro-services with neo4j

If storage volume #3 goes down, what services will be impacted?

Page 76: Managing micro-services with neo4j
Page 77: Managing micro-services with neo4j

Other Use Cases

Page 78: Managing micro-services with neo4j
Page 79: Managing micro-services with neo4j

Because no talk on microservices would be complete without a lego

analogy

Page 80: Managing micro-services with neo4j

https://github.com/if6was9/macgyver https://github.com/if6was9/neorx

For More Info…

Lending Club Ashley Sun Rob Schoening @lendingclub @ashleycsun @rschoening

[email protected] [email protected]