20000 leagues under the sea: diving into the slack infrastructure

41
20,000 Leagues Under the Sea: Diving into the Slack Infrastructure Raissa Largman, Infrastructure Engineer

Upload: raissa-largman

Post on 06-Apr-2017

29 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

20,000 Leagues Under the Sea:

Diving into the Slack Infrastructure

Raissa Largman, Infrastructure Engineer

Page 2: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

Infrastructure Hunger Games Champion 2017

Java backend developer

Been at Slack since January 2016

Who is Raissa?

Page 3: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

Agenda:

1.Past - Where did we embark from for this voyage?

2.The problem - The kraken3.Present - How are we fighting off the kraken?

4.Future - Building armor against future krakens

5.Q&A

Page 4: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

Part 1:In the Beginning

Page 5: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

Message Server

Basic Architecture

Your client#team-backend-

servicesWebapp / Database

Page 6: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

Sending a Message (MS1.0)

Page 7: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

Message Server

Going Over the Socket (MS1.0)

Your client#team-backend-services

Page 8: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

Message Server

Other People See the Message (MS1.0)

Your client#team-backend-services

Julia#team-backend-services

Serguei#team-backend-services

Page 9: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

Message Server

Saving in the Database (MS1.0)

Webapp / Database

Page 10: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure
Page 11: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

Message Server 1

Message Server Expansion

Clients Webapp / Database

Message Server 2

Message Server 3

...

Page 12: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure
Page 13: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure
Page 14: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

Enterprise Grid

Page 15: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

Enterprise Shared Channels

Page 16: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

Message Server (Team 1)

Going Over the Socket (MS1.0)

Your client#announcements-global

(shared)

Page 17: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

Message Server (Team 1)

Other People See the Message (MS1.0)

Your client#announcements-global

Juan Local#announcements-global

Susan B. Enterprise#annoucements-global

Message Server (Team 2)

Page 18: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

Message Server (Team 1)

Other People See the Message (MS1.0)

Your client#announcements-global

Juan Local#announcements-global

Susan B. Enterprise#annoucements-global

Message Server (Team 2)

Page 19: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

Message Server (Team 1)

Other People See the Message (MS1.0)

Your client#announcements-global

Juan Local#announcements-global

Susan B. Enterprise#annoucements-global

Message Server (Team 2)

Page 20: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

Message Server (Team 1)

Saving in the Database (MS1.0)

Webapp / Database

Message Server (Team 2)

Page 21: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

{

"team_id":"T6789",

"ms_host":"ms101",

"shared_channels":[

"C111":["T1234","T4567","T6789"],

"C234":["T4567","T6789"],

"C346":["T1234","T6789"],

...

]

}

Team Meta

Page 22: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

Part 2:Current State of Affairs

Page 23: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

Deploy Confidence

Scaling - Enterprise Shared Channels

“Second System Syndrome”

Why Create the Hybrid MS1.5?

Page 24: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

Sending a Message (MS1.5)

Page 25: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

Message Server (Nautilus)

Going Over the Socket (MS1.5)

Your client#announcements-global

(shared)

Page 26: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

Message Server (Nautilus)

Passing to the Channel Server (MS1.5)

Channel Server (#announcements-

global)

Page 27: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

Message Server (Nautilus)

Passing back to Message Servers (MS1.5)

Channel Server (#announcements-

global)

Message Server (Yellow Submarine)

Page 28: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

Channel Server (#announcements-

global)

Saving in the Database (MS1.5)

Webapp / Database

Page 29: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

Message Server (Nautilus)

Other People See the Message (MS1.5)

Your client#announcements-global

Jules Verne#announcements-global

John Lennon#annoucements-global

Message Server (Yellow Submarine)

Page 30: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

Bonus Benefit (MS1.5)

Consul

Admin ServerChannel Servers

Page 31: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure
Page 32: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure
Page 33: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

Part 3:The Future™

Page 34: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

1 server becomes 4

MS2.0

Page 35: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

Admin Server

Admin Server

Webapp / Database

Page 36: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

Gateway Server

Gateway Server

Clients

Page 37: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

Presence Server

Presence Server

Gateway ServerAdmin Server

Page 38: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

Functionality is the same

MS1.0

Message Server (MS)

Channel Server (CS) Admin Server (AS) Presence Server

(PS)Gateway Server

(GS)

MS2.0

Page 39: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure
Page 40: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

Q&A

Page 41: 20000 Leagues Under the Sea: Diving Into the Slack Infrastructure

Thanks!

Got questions? [email protected]