186
#DevoxxFR #networxx Consignes de sécurité Merci de vous assoir en priorité devant Et plutôt regroupés (des perturbations sont à prévoir) Vos accompagnateurs vont bientôt vous expliquer comment utiliser les coupons de survie qui se trouvent sur chacun de vos sièges NETWORXX Airlines

Networxx (intro et fin)

Embed Size (px)

Citation preview

Page 1: Networxx (intro et fin)

#DevoxxFR #networxx

Consignes de sécurité

• Merci de vous assoir en priorité devant

• Et plutôt regroupés (des perturbations sont à prévoir)

• Vos accompagnateurs vont bientôt vous expliquer comment utiliser les coupons de survie qui se trouvent sur chacun de vos sièges

NETWORXX Airlines

Page 2: Networxx (intro et fin)

#DevoxxFR #networxx

Page 3: Networxx (intro et fin)

#DevoxxFR #networxx

NETWORXX

Cyrille Dupuydauby @cyrdup Raphaël Luta @raphaelluta Thomas Pierrain @tpierrain

Page 4: Networxx (intro et fin)

#DevoxxFR #networxx

@cyrdup• Approche ‘Pit of success’

• Parle (trop) fort

• Code depuis (trop) longtemps

• Regarde (trop) sous le capot

• Poste (trop) peu sur son blog

• Aime (trop) le multithread

• Contributeur OSS (NFluent, Michonne, Rafting)

Page 5: Networxx (intro et fin)

#DevoxxFR #networxx

@raphaelluta

• Adepte de Pareto

• Disciple de Little et Gunther

• Praticien de Murphy

• Défenseur de Tufte

• Pourfendeur de Metcalfe

Page 6: Networxx (intro et fin)

#DevoxxFR #networxx

@tpierrain• use case driven

(« range ce marteau en or ! »)

• Aime comprendre et donner du sens à ce qu’il fait (métier, technique)

• Mélange les genres et les cultures (DDD & low latency par exemple)

• Organise des trucs de geeks le midi

• A joué en prod avec beaucoup de MoM ;-)

Page 7: Networxx (intro et fin)

#DevoxxFR #networxx

Question

Page 8: Networxx (intro et fin)

#DevoxxFR #networxx

A quand remonte la dernière fois que vous avez regardé

derrière la prise?

Page 9: Networxx (intro et fin)

#DevoxxFR #networxx

Page 10: Networxx (intro et fin)

#DevoxxFR #networxx

Objectifs

• Une culture réseaux rafraîchie

• Enrichir votre boite à outils

• Un modele mental utile

Page 11: Networxx (intro et fin)

#DevoxxFR #networxx

Prêts ?

Page 12: Networxx (intro et fin)

#DevoxxFR #networxx

Page 13: Networxx (intro et fin)

#DevoxxFR #networxx

La mission

Page 14: Networxx (intro et fin)

#DevoxxFR #networxx

Page 15: Networxx (intro et fin)

#DevoxxFR #networxx

BriefingSituation d’urgence:

Notre client « Tapiocorp », spécialisé dans l’agriculture biologique, à des gros problèmes de performance sur son site Web

L’hypothèse la plus probable à cette heure est une cyber attaque organisée par un groupe terroriste (probablement financé par un géant de l’agro-alimentaire)

Des ramifications politiques sont à envisager…

Page 16: Networxx (intro et fin)

#DevoxxFR #networxx

Les infos disponibles

• Un système utilisant les dernières technologies

• Conçu et développé par les meilleurs experts

• Un frontal web masquant une plate forme back office de pointe

Page 17: Networxx (intro et fin)

#DevoxxFR #networxx

Page 18: Networxx (intro et fin)

#DevoxxFR #networxx

La réalité

Page 19: Networxx (intro et fin)

#DevoxxFR #networxx

BriefingSituation d’urgence:

Notre client « Tapiocorp », spécialisé dans l’agriculture biologique, à des gros problèmes de performance sur son site Web

L’hypothèse la plus probable à cette heure est une cyber attaque organisée par un groupe terroriste (probablement financé par un géant de l’agro-alimentaire)

Des ramifications politiques sont à envisager…

En fait, c’est juste très lent, mais pourquoi…?

Page 20: Networxx (intro et fin)

#DevoxxFR #networxx

Observé par Tapiocorp

Temps moyen d’affichage de la page :

23,742 secondes

Page 21: Networxx (intro et fin)

#DevoxxFR #networxx

La doc disponible…

Page 22: Networxx (intro et fin)

#DevoxxFR #networxx

#1 Souci

Page 23: Networxx (intro et fin)

#DevoxxFR #networxx

C’est lent

#DevoxxFR #networxx

Page 24: Networxx (intro et fin)

#DevoxxFR #networxx

Propositions

A. Réécrire le serveur PHP avec un vrai

langage

B. Améliorer le hardware

C. Mesurer et agir en conséquence

D. La réponse D

Page 25: Networxx (intro et fin)

#DevoxxFR #networxx

Proposition

A. Réécrire le serveur PHP avec un vrai

langage

B. Améliorer le hardware

C. Mesurer et agir en conséquence

D. La réponse D

Page 26: Networxx (intro et fin)

#DevoxxFR #networxx

Ca va être long

Page 27: Networxx (intro et fin)

#DevoxxFR #networxx

Proposition

A. Réécrire le serveur PHP avec un vrai

langage

B. Améliorer le hardware

C. Mesurer et agir en conséquence

D. La réponse D

Page 28: Networxx (intro et fin)

#DevoxxFR #networxx

c’est beau mais c’est cher

Page 29: Networxx (intro et fin)

#DevoxxFR #networxx

Et surtout, cela n’améliore pas vraiment les choses…

Page 30: Networxx (intro et fin)

#DevoxxFR #networxx

Proposition

A. Réécrire le serveur PHP avec un vrai

langage

B. Améliorer le hardware

C. Mesurer et agir en conséquence

D. La réponse D

Page 31: Networxx (intro et fin)

#DevoxxFR #networxx

BIEN JOUÉ

Page 32: Networxx (intro et fin)

#DevoxxFR #networxx

DON’T GUESS, MEASURE

#1

Page 33: Networxx (intro et fin)

#DevoxxFR #networxx

Page 34: Networxx (intro et fin)

#DevoxxFR #networxx

Page 35: Networxx (intro et fin)

#DevoxxFR #networxx

Observé par Tapiocorp

Temps moyen d’affichage de la page :

23,742 secondes

Page 36: Networxx (intro et fin)

#DevoxxFR #networxx

MOYENNE PERCENTILES, PERCENTILES,

PERCENTILES…

#2

Page 37: Networxx (intro et fin)

#DevoxxFR #networxx

Les résultats (vue user)

TTFB

Page loadMediane

Page 38: Networxx (intro et fin)

#DevoxxFR #networxx

Page 39: Networxx (intro et fin)

#DevoxxFR #networxx

Question

Qu’est ce qu’on fait maintenant ?

Page 40: Networxx (intro et fin)

#DevoxxFR #networxx

Propositions

A. Vraiment, je réécris le PHP, mais en

SCALA

B. Je révise mon TCP

C. J’optimise mes requêtes Oracle

D. La réponse D

Page 41: Networxx (intro et fin)

#DevoxxFR #networxx

Proposition

A. Vraiment, je réécris le PHP, mais en

SCALA

B. Je révise mon TCP

C. J’optimise mes requêtes Oracle

D. La réponse D

Page 42: Networxx (intro et fin)

#DevoxxFR #networxx

Temps de faire de la spéléologie…

Page 43: Networxx (intro et fin)

#DevoxxFR #networxx

Page 44: Networxx (intro et fin)

#DevoxxFR #networxx

HTTP 1.xBasé sur du texte

Orienté question réponse

Basé sur TCP/IP

Page 45: Networxx (intro et fin)

#DevoxxFR #networxx

TCPTCP = Transmission Control Protocol

Orienté connexion et garantie de transmission (dans l’ordre)

Bidirectionnel et full duplex

‘Good citizenship’

TCP

Page 46: Networxx (intro et fin)

#DevoxxFR #networxx

IPInternet Protocol

Assure le transfert de paquets de données entre deux ordinateurs

Garanti que l’en-tête du paquet est valide

Et pis c’est tout

Page 47: Networxx (intro et fin)

#DevoxxFR #networxx

Le réseau

Ethernet (Cable/Fibre)

Wifi (Air)

3G (Air)

Page 48: Networxx (intro et fin)

#DevoxxFR #networxx

TCP: un gros tuyau? TCP

Page 49: Networxx (intro et fin)

#DevoxxFR #networxx

Magique? TCP

Page 50: Networxx (intro et fin)

#DevoxxFR #networxx

Magique!

TCP/IP permet de faire de la transmission FIABLE sur un réseau

NON FIABLE

TCP

Page 51: Networxx (intro et fin)

#DevoxxFR #networxx

Maintenant:Redécouvrons TCP/IP

Façon Montessori !

TCPUDP

Page 52: Networxx (intro et fin)

#DevoxxFR #networxx

Mise en jambes#1 UDP

Page 53: Networxx (intro et fin)

#DevoxxFR #networxx

Prêts?

Page 54: Networxx (intro et fin)

#DevoxxFR #networxx

Un peu d’aléa ?

#2.a UDP

Page 55: Networxx (intro et fin)

#DevoxxFR #networxx

Quel est le message?

Page 56: Networxx (intro et fin)

#DevoxxFR #networxx

‘A travers les réponses à ces questions, nous verrons ensemble pourquoi la

maîtrise de toutes les couches réseaux doit faire partie de la boite à outils de

tout bon dev full-stack’

Page 57: Networxx (intro et fin)

#DevoxxFR #networxx

Bilan ?#2.a UDP

Page 58: Networxx (intro et fin)

#DevoxxFR #networxx

Bilan

On a perdu des enveloppes Quel désordre !

#2.a UDP

Page 59: Networxx (intro et fin)

#DevoxxFR #networxx

Un peu d’ordre TCP#2.b

Page 60: Networxx (intro et fin)

#DevoxxFR #networxx

Quel est le message?

Page 61: Networxx (intro et fin)

#DevoxxFR #networxx

‘Pourquoi Google ne respecte t-il pas le protocole TCP ? Qui est Naggle, et pourquoi

garde t-il mes données en otage ? UDP est-il un protocole voyou ? Pourquoi les fichiers ne se

transmettent-ils jamais à la vitesse attendue ?’

Page 62: Networxx (intro et fin)

#DevoxxFR #networxx

Un travail pour le client TCP#3

Page 63: Networxx (intro et fin)

#DevoxxFR #networxx

Bilan

on manque d’efficacité !

TCP#3

Page 64: Networxx (intro et fin)

#DevoxxFR #networxx

On coupe le client?#3

Page 65: Networxx (intro et fin)

#DevoxxFR #networxx

Flow control et donc … négociation

TCP#4

Page 66: Networxx (intro et fin)

#DevoxxFR #networxx

Page 67: Networxx (intro et fin)

#DevoxxFR #networxx

TCP#4

Page 68: Networxx (intro et fin)

#DevoxxFR #networxx

TCP#5 Réseau non trivial

Page 69: Networxx (intro et fin)

#DevoxxFR #networxx

Slow start & Congestion control

TCP#5

Page 70: Networxx (intro et fin)

#DevoxxFR #networxx

Méfiez vous des intermédiaires ! TCP

Page 71: Networxx (intro et fin)

#DevoxxFR #networxx

TCPMéfiez vous des intermédiaires

Page 72: Networxx (intro et fin)

#DevoxxFR #networxx

Une connexion TCP peut se couper sans que vous le sachiez

Dans les faits

Page 73: Networxx (intro et fin)

#DevoxxFR #networxx

TCP Connection is an abstraction!

#3

Page 74: Networxx (intro et fin)

#DevoxxFR #networxx

Wrap upEchanges fiables sur medium non-fiable

Grace à :

• Numérotation paquet

•Acquittements

•Flow control

•Congestion control

TCP

Page 75: Networxx (intro et fin)

#DevoxxFR #networxx

Back to business

Page 76: Networxx (intro et fin)

#DevoxxFR #networxx

Page 77: Networxx (intro et fin)

#DevoxxFR #networxx

Page 78: Networxx (intro et fin)

#DevoxxFR #networxx

Propositions

A. Je transforme mon monolithe en

micro-services

B. Je regarde les flux front

C. Je regarde les flux backend

D. La réponse D

Page 79: Networxx (intro et fin)

#DevoxxFR #networxx

Perdu !

Page 80: Networxx (intro et fin)

#DevoxxFR #networxx

Propositions

A. Je transforme mon monolithe en

micro-services

B. Je regarde les flux front

C. Je regarde les flux backend

D. La réponse D

Page 81: Networxx (intro et fin)

#DevoxxFR #networxx

Problème #1 (côté backends)

Page 82: Networxx (intro et fin)

#DevoxxFR #networxx

Une idée ?

Page 83: Networxx (intro et fin)

#DevoxxFR #networxx

Zoomons un peu …

Page 84: Networxx (intro et fin)

#DevoxxFR #networxx

Peu de données échangées mais un temps de réponse

important

1 requête client =>

des centaines de petites requêtes sur

les services back

Page 85: Networxx (intro et fin)

#DevoxxFR #networxx

Chatty interactions

Page 86: Networxx (intro et fin)

#DevoxxFR #networxx

Problème #1 - Chatty interactions

Problème de granularité des APIs

Beaucoup trop de petits aller-retours

Page 87: Networxx (intro et fin)

#DevoxxFR #networxx

Pour chaque appel de service

Latence totale = latence traitement requête par le service + latence réseau

Page 88: Networxx (intro et fin)

#DevoxxFR #networxx

Pour chaque appel de service

Latence totale = latence traitement requête par le service + latence réseau

Page 89: Networxx (intro et fin)

#DevoxxFR #networxx

Des frais de bouches réseaux qui commencent à peser…

SVC1

SVC3

SVC 2

Back end web (PHP)

latence réseaulatence service

Page 90: Networxx (intro et fin)

#DevoxxFR #networxx

SVC1

SVC3

SVC 2

Back end web (PHP)

Surtout pour…

Des frais de bouches réseaux qui commencent à peser…

latence réseaulatence service

Page 91: Networxx (intro et fin)

#DevoxxFR #networxx

Un ROI parfois discutable…

latence traitement requête par le service

latence réseau(hand shake TCP)

Page 92: Networxx (intro et fin)

#DevoxxFR #networxx

La solution ?

Page 93: Networxx (intro et fin)

#DevoxxFR #networxx

La solution ?

Du chunk !

Page 94: Networxx (intro et fin)

#DevoxxFR #networxx

La solution ?

Euh… du chunk !

Page 95: Networxx (intro et fin)

#DevoxxFR #networxx

Chatty vs. ChunkyBatchons nos requêtes pour éviter de payer des frais de latence réseau systématiques

SVC1

SVC3

SVC 2

Back end web (PHP)

Chatty

SVC1

SVC3

SVC 2

Back end web (PHP)

Chunky

Page 96: Networxx (intro et fin)

#DevoxxFR #networxx

C’est une question de design

Page 97: Networxx (intro et fin)

#DevoxxFR #networxx

Comme si l’exécution était locale…

La malédiction du remoting…

Page 98: Networxx (intro et fin)

#DevoxxFR #networxx

Comme si l’exécution était locale…

La malédiction du remoting…

CORBA

RMI

EJB

WCF…

C’est ça ! et la marmotte…

Page 99: Networxx (intro et fin)

#DevoxxFR #networxx

A une approche code-first…

Le réseau, cet inconnu…

Page 100: Networxx (intro et fin)

#DevoxxFR #networxx

…préférons une approche contract-first

Désignons nos APIs en tenant compte des contraintes d’un

monde non-localhost

Page 101: Networxx (intro et fin)

#DevoxxFR #networxx

Parfois, un simple geste peut vous sauver

Le Data Transfer Object (DTO)

Page 102: Networxx (intro et fin)

#DevoxxFR #networxx

Question

Est-ce que le batching rajoute

de la latence ?

Page 103: Networxx (intro et fin)

#DevoxxFR #networxx

Propositions

A. Je m’en fout, tant qu’il y a des

monades…

B. Oui, le batching rajoute de la latence

C. Non, pas forcément

D. La réponse D

Page 104: Networxx (intro et fin)

#DevoxxFR #networxx

Réponse

A. Je m’en fout, tant qu’il y a des

monades…

B. Oui, le batching rajoute de la latence

C. Non, pas forcément

D. La réponse D

Page 105: Networxx (intro et fin)

#DevoxxFR #networxx

Le paradoxe du smart batching

Page 106: Networxx (intro et fin)

#DevoxxFR #networxx

Budget latence

}

}

}

}

}

Send Kernel 40%

Send API: 6%

Serialization: 2% Ethernet Switch: 4%

Receive Kernel 40%

Receive API: 6%

Latences relatives sur la route d’un messaging low latency

(LAN)

Page 107: Networxx (intro et fin)

#DevoxxFR #networxx

Budget latence

User space

Kernel I/O

User space

Kernel I/O

LAN

Page 108: Networxx (intro et fin)

#DevoxxFR #networxx

Budget latence

User space

Kernel I/O

User space

Kernel I/O

LAN

Page 109: Networxx (intro et fin)

#DevoxxFR #networxx

Budget latence

User space

Kernel I/O

User space

Kernel I/O

LAN

Page 110: Networxx (intro et fin)

#DevoxxFR #networxx

Budget latence

User space

Kernel I/O

User space

Kernel I/O

LAN

Page 111: Networxx (intro et fin)

#DevoxxFR #networxx

Budget latence

User space

Kernel I/O

User space

Kernel I/O

LAN

Page 112: Networxx (intro et fin)

#DevoxxFR #networxx

Budget latence

User space

Kernel I/O

User space

Kernel I/O

LAN

Page 113: Networxx (intro et fin)

#DevoxxFR #networxx

Budget latence

User space

Kernel I/O

User space

Kernel I/O

LAN

Page 114: Networxx (intro et fin)

#DevoxxFR #networxx

Budget latence

User space

Kernel I/O

User space

Kernel I/O

LAN

Page 115: Networxx (intro et fin)

#DevoxxFR #networxx

Budget latence

User space

Kernel I/O

User space

Kernel I/O

LAN

Page 116: Networxx (intro et fin)

#DevoxxFR #networxx

Budget latence

Le passage par le kernel est une grosse partie du budget latence sur le LAN

40% 40%

6%

Serialization: 2% Ethernet Switch: 4%

6%

User space

Kernel I/O $ $ $

User space

Kernel I/O$ $ $

LAN

Page 117: Networxx (intro et fin)

#DevoxxFR #networxx

Smart batching

« … when batching is done correctly, not only does it increase throughput,

it can also reduce average latency and keep it consistent. »

Martin THOMPSON

Page 118: Networxx (intro et fin)

#DevoxxFR #networxx

Smart batching

source: Martin THOMPSON (Mechanical Sympathy blog)

Page 119: Networxx (intro et fin)

#DevoxxFR #networxx

Smart batching

Si chaque passage coûte cher en latence, on a intérêt à partager le

prix du péage à plusieurs

Page 120: Networxx (intro et fin)

#DevoxxFR #networxx

Ou alors…

on peut aussi gruger ;-)

Page 121: Networxx (intro et fin)

#DevoxxFR #networxx

Kernel bypass

Comme le passage par le kernel coute cher…

Serialization: 2% Ethernet Switch: 4%

User space

Kernel I/O

User space

Kernel I/O

LAN

Page 122: Networxx (intro et fin)

#DevoxxFR #networxx

Kernel bypass

… on évite de passer par le kernel (nécessite des NICs spécifiques)

User space

Kernel I/O

User space

Kernel I/O

LAN

Page 123: Networxx (intro et fin)

#DevoxxFR #networxx

Problème #2 (côté backends)

Page 124: Networxx (intro et fin)

#DevoxxFR #networxx

« EN FAIT… LA TAILLE, ÇA

COMPTE. »

Page 125: Networxx (intro et fin)

#DevoxxFR #networxx

Attention à la taille des messages !

et donc au format de sérialization

Page 126: Networxx (intro et fin)

#DevoxxFR #networxx

Problème #2 - La taille des messages

« SOAP XML ? je pense qu’on peut trouver mieux les gars…

Allez, on s’active ! »

Ethan HUNT

Page 127: Networxx (intro et fin)

#DevoxxFR #networxx

Le poids du savon…

Page 128: Networxx (intro et fin)

#DevoxxFR #networxx

Le poids du savon…

Page 129: Networxx (intro et fin)

#DevoxxFR #networxx

Le poids du savon…

Page 130: Networxx (intro et fin)

#DevoxxFR #networxx

Le poids du savon…

Page 131: Networxx (intro et fin)

#DevoxxFR #networxx

Le bon outil pour le bon usage

JSON, Protobuf, FlatBuffers, AVRO, SBE,…

Page 132: Networxx (intro et fin)

#DevoxxFR #networxx

Problème #3 (côté backends)

Page 133: Networxx (intro et fin)

#DevoxxFR #networxx

RPC(Remote Procedure Call)

BURN THE SYNCHRONOUS WITCH!

Page 134: Networxx (intro et fin)

#DevoxxFR #networxx

Make all things Asynchronous

Page 135: Networxx (intro et fin)

#DevoxxFR #networxx

Page 136: Networxx (intro et fin)

#DevoxxFR #networxx

Paradigmes

RPC paradigm

on réduit le couplage(binaire->XML)

CORBA - RMI - EJB SOAP WS

REST paradigm

on réduit le couplage(URIs->hypermedia)

REST HATEOAS

Page 137: Networxx (intro et fin)

#DevoxxFR #networxx

Paradigmes

MoM paradigm

on réduit le couplage(API->protocol)

JMS AMQP

Page 138: Networxx (intro et fin)

#DevoxxFR #networxx

Effectivement, on n’est pas obligé de

n’utiliser que …

Page 139: Networxx (intro et fin)

#DevoxxFR #networxx

REST/JSON

Page 140: Networxx (intro et fin)

#DevoxxFR #networxx

Meilleur découplage (topic based)

Absorbe la charge (de distribution)

Load Balancing (des consommateurs)

Scenarii de résilience (FT)

Gère les connexions

Un bon MoM, ça peut toujours servir !

Page 141: Networxx (intro et fin)

#DevoxxFR #networxx

MoM classique (*MQ)

Broker based PubSub (fan-out)

Subscriber1

BrokerBroker

Broker (cluster)

PublisherSubscriber

2Subscriber

3

topic A topic A

TCP

Page 142: Networxx (intro et fin)

#DevoxxFR #networxx

MoM classique (*MQ)

Subscriber1

BrokerBroker

Broker (cluster)

PublisherSubscriber

2Subscriber

3

Broker based PubSub (fan-out)

topic A

topic A topic A

TCP

Page 143: Networxx (intro et fin)

#DevoxxFR #networxx

MoM classique (*MQ)

Subscriber1

BrokerBroker

Broker (cluster)

PublisherSubscriber

2Subscriber

3

Broker based PubSub (fan-out)

topic A

topic A topic A

TCP

Page 144: Networxx (intro et fin)

#DevoxxFR #networxx

MoM classique (*MQ)

Subscriber1

BrokerBroker

Broker (cluster)

PublisherSubscriber

2Subscriber

3

Broker based PubSub (fan-out)

topic A

topic A topic A

TCP

Page 145: Networxx (intro et fin)

#DevoxxFR #networxx

MoM classique (*MQ)

Subscriber1

BrokerBroker

Broker (cluster)

PublisherSubscriber

2Subscriber

3

Broker based PubSub (fan-out)

topic A

topic A topic A

TCP

Page 146: Networxx (intro et fin)

#DevoxxFR #networxx

MoM classique (*MQ)

Subscriber1

BrokerBroker

Broker (cluster)

PublisherSubscriber

2Subscriber

3

Broker based PubSub (fan-out)

topic A

topic A topic A

TCP

Page 147: Networxx (intro et fin)

#DevoxxFR #networxx

MoM classique (*MQ)

Subscriber1

BrokerBroker

Broker (cluster)

PublisherSubscriber

2Subscriber

3

Broker based PubSub (fan-out)

topic A

topic A

topic A topic A

TCP

Page 148: Networxx (intro et fin)

#DevoxxFR #networxx

MoM classique (*MQ)

Subscriber1

BrokerBroker

Broker (cluster)

PublisherSubscriber

2Subscriber

3

Broker based PubSub (fan-out)

topic A

topic A topic A

TCP

topic A

Page 149: Networxx (intro et fin)

#DevoxxFR #networxx

MoM classique (*MQ)

Subscriber1

BrokerBroker

Broker (cluster)

PublisherSubscriber

2Subscriber

3

Broker based PubSub (fan-out)

topic A

topic A topic A

TCP

topic A

Page 150: Networxx (intro et fin)

#DevoxxFR #networxx

MoM classique (*MQ)

Subscriber1

BrokerBroker

Broker (cluster)

PublisherSubscriber

2Subscriber

3

Broker based PubSub (fan-out)

topic A

topic A topic A

TCP

topic A

Page 151: Networxx (intro et fin)

#DevoxxFR #networxx

MoM classique (*MQ)

Subscriber1

BrokerBroker

Broker (cluster)

PublisherSubscriber

2Subscriber

3

Broker based PubSub (fan-out)

topic A topic A

TCP

topic A

Page 152: Networxx (intro et fin)

#DevoxxFR #networxx

MoM classique (*MQ)

Subscriber1

BrokerBroker

Broker (cluster)

PublisherSubscriber

2Subscriber

3

Broker based PubSub (fan-out)

topic A

topic A topic A

TCP

topic A

Page 153: Networxx (intro et fin)

#DevoxxFR #networxx

MoM classique (*MQ)

Subscriber1

BrokerBroker

Broker (cluster)

PublisherSubscriber

2Subscriber

3

Broker based PubSub (fan-out)

topic A

topic A topic A

TCP

topic A

Page 154: Networxx (intro et fin)

#DevoxxFR #networxx

MoM classique (*MQ)

Subscriber1

BrokerBroker

Broker (cluster)

PublisherSubscriber

2Subscriber

3

Broker based PubSub (fan-out)

topic A

topic A topic A

TCP

topic A

Page 155: Networxx (intro et fin)

#DevoxxFR #networxx

MoM classique (*MQ)

Subscriber1

BrokerBroker

Broker (cluster)

PublisherSubscriber

2Subscriber

3

Broker based PubSub (fan-out)

topic A

topic A topic A

TCP

topic A

Page 156: Networxx (intro et fin)

#DevoxxFR #networxx

MoM classique (*MQ)

Subscriber1

BrokerBroker

Broker (cluster)

PublisherSubscriber

2Subscriber

3

Broker based PubSub (fan-out)

topic A topic A

TCP

Page 157: Networxx (intro et fin)

#DevoxxFR #networxx

MoM classique (*MQ)

Subscriber1

BrokerBroker

Broker (cluster)

PublisherSubscriber

2Subscriber

3

Broker based PubSub (fan-out)

topic A topic A

TCP

Page 158: Networxx (intro et fin)

#DevoxxFR #networxx

Version plus équitable (UDP Multicast)

UDP

Page 159: Networxx (intro et fin)

#DevoxxFR #networxx

MoM classique (*MQ)

Broker based PubSub (fan-out)

Subscriber1

Broker (cluster)

PublisherSubscriber

2Subscriber

3

topic A topic A

Page 160: Networxx (intro et fin)

#DevoxxFR #networxx

MoM multicast

Pub/Sub sans Broker (fan-out équitable)

Subscriber1Publisher

Subscriber2

Subscriber3

topic A topic A

Network switch

UDP

Page 161: Networxx (intro et fin)

#DevoxxFR #networxx

MoM multicast

Subscriber1Publisher

Subscriber2

Subscriber3

topic A topic A

Network switch

topic A

Pub/Sub sans Broker (fan-out équitable)

UDP

Page 162: Networxx (intro et fin)

#DevoxxFR #networxx

MoM multicast

Subscriber1Publisher

Subscriber2

Subscriber3

topic A topic A

Network switch

topic A

Pub/Sub sans Broker (fan-out équitable)

UDP

Page 163: Networxx (intro et fin)

#DevoxxFR #networxx

MoM multicast

Subscriber1Publisher

Subscriber2

Subscriber3

topic A topic A

Network switch

topic A

Pub/Sub sans Broker (fan-out équitable)

UDP

Page 164: Networxx (intro et fin)

#DevoxxFR #networxx

MoM multicast

Subscriber1Publisher

Subscriber2

Subscriber3

topic A topic A

Network switch

topic A

Pub/Sub sans Broker (fan-out équitable)

UDP

Page 165: Networxx (intro et fin)

#DevoxxFR #networxx

MoM multicast

Subscriber1Publisher

Subscriber2

Subscriber3

topic A topic A

Network switch

topic Atopic A

Pub/Sub sans Broker (fan-out équitable)

UDP

Page 166: Networxx (intro et fin)

#DevoxxFR #networxx

MoM multicast

Subscriber1Publisher

Subscriber2

Subscriber3

topic A topic A

Network switch

topic Atopic A

Pub/Sub sans Broker (fan-out équitable)

UDP

Page 167: Networxx (intro et fin)

#DevoxxFR #networxx

MoM multicast

Subscriber1Publisher

Subscriber2

Subscriber3

topic A topic A

Network switch

topic A topic A

Pub/Sub sans Broker (fan-out équitable)

UDP

Page 168: Networxx (intro et fin)

#DevoxxFR #networxx

MoM multicast

Subscriber1Publisher

Subscriber2

Subscriber3

topic A topic A

Network switch

topic A topic A

Pub/Sub sans Broker (fan-out équitable)

UDP

Page 169: Networxx (intro et fin)

#DevoxxFR #networxx

MoM multicast

Subscriber1Publisher

Subscriber2

Subscriber3

topic A topic A

Network switch

Pub/Sub sans Broker (fan-out équitable)

UDP

Page 170: Networxx (intro et fin)

#DevoxxFR #networxx

UDP multicast plus performant et plus équitable certes, mais moins poli, moins fiable et beaucoup moins complet que TCP

Page 171: Networxx (intro et fin)

#DevoxxFR #networxx

Une grosse différence

TCP: consumer-paced

UDP: source-paced

Page 172: Networxx (intro et fin)

#DevoxxFR #networxx

Une grosse différence

TCP: consumer-paced limité par le plus lent

UDP: source-paced on lâche les ours

Page 173: Networxx (intro et fin)

#DevoxxFR #networxx

Page 174: Networxx (intro et fin)

#DevoxxFR #networxx

PAUSE

TCP

Page 175: Networxx (intro et fin)

#DevoxxFR #networxx

Wrap up

Page 176: Networxx (intro et fin)

#DevoxxFR #networxx

Une culture réseaux rafraîchie

• TCP / IP en action

• Les types de réseaux

• HTTP .*

Page 177: Networxx (intro et fin)

#DevoxxFR #networxx

• MoM

• Techniques de mesures

• Outils ligne de commande

Enrichir votre boite à outils

Page 178: Networxx (intro et fin)

#DevoxxFR #networxx

Un modele mental utile

• L’impact latence / bande

passante

• Connecté mais non…

Page 179: Networxx (intro et fin)

#DevoxxFR #networxx

En parlant de modèle mental…

Page 180: Networxx (intro et fin)

#DevoxxFR

8 FALLACIES OF DISTRIBUTED SYSTEMS

Deutsch & Gosling

Page 181: Networxx (intro et fin)

#DevoxxFR

Page 182: Networxx (intro et fin)

#DevoxxFR

Peter Deutsch & James Gosling

8 FALLACIES OF DISTRIBUTED SYSTEMS

Page 183: Networxx (intro et fin)

#DevoxxFR

8 FALLACIES OF DISTRIBUTED SYSTEMS

1. The network is reliable.

2. Latency is zero.

3. Bandwidth is infinite.

4. The network is secure.

5. Topology doesn't change.

6. There is one administrator.

7. Transport cost is zero.

8. The network is homogeneous.

Page 184: Networxx (intro et fin)

#DevoxxFR

8 FALLACIES OF DISTRIBUTED SYSTEMS

1. The network is reliable.

2. Latency is zero.

3. Bandwidth is infinite.

4. The network is secure.

5. Topology doesn't change.

6. There is one administrator.

7. Transport cost is zero.

8. The network is homogeneous.

Page 185: Networxx (intro et fin)

#DevoxxFR #networxx

Merci !

Page 186: Networxx (intro et fin)

#DevoxxFR #networxx

Q & A