SlideShare a Scribd company logo
Glusterfs Session #7
client, server interactions
Scope
- Server init with all programs
- Client Connection - interaction with server xlator
- Client disconnection - interaction with server xlator
- Client reconnection - interaction with server xlator
Server init
- Server xlator sets up auth and programs it supports in the initialization of the
translator
- Demo server_init
Client connection
- On Graph’s PARENT_UP notification rpc-clnt starts connecting to the brick.
- Client first connects to glusterd on the node where the brick is located.
- Once the connection is successful client asks glusterd for the port the brick is running on
- Once it gets the port information, connection with glusterd is disconnected.
- Connection to the brick is established with the port information received from glusterd
Client connection - continued
- After successful connection with the brick
- DUMP_OP rpc is sent to the brick to get the supported programs and their versions
- Decides the version it will use for the fop rpcs v3 vs v4, newer clients go for v4 if the server
has the support, otherwise v3.
- HNDSHK_SETVOLUME rpc is sent now with the credentials and options the clients wants
from the server
- If server accepts the SETVOLUME, we have a successful connection on which glusterfs rpcs
can be sent.
Client connection - continued
- Server will setup the necessary structures(client_t) to make sure the
resources can be cleaned up in case there is a disconnect.
- Client_t data structure Code
Client disconnection
- Client can disconnect because of the following reasons
- Explicit disconnect either from client(graph switch) or server(auth changes)
- Process dying
- client/server Machine shutting off
- Network issues
- On client
- all the open fds are marked bad, further fops on these fds would fail with EBADF.
- Reconnection timers are started which would attempt reconnection.
Client disconnection - continued
- On disconnect server will get a disconnect event and server_rpc_notify will
- cleanup all the resources like locks, open fds.
- All the ongoing requests will be errored while responding because the socket is disconnected
- Structures corresponding to the connection will be cleaned up
- Client_destroy, client_disconnect callbacks are called for each xlator
- Code
Client reconnection
- If client disconnected from server but the client process is still running, then
client will keep trying to reconnect every 3 seconds.
- Each connection attempt would be similar to the connection sequence. The
only difference would be the client connection id will have the reconnection
number incremented
- Once the connection is restored client tries to recover the resources on the
connection like open fds. At the moment locks are not restored.
Client reconnection - continued
- For all the fds that are marked bad in client, a reopen request is sent to the
server. This is best-effort. If reopens for any files/directories fail the fd would
still be bad and would continue to give EBADF.
- Once re-opens are completed the client xlator will notify the parents
CHILD_UP event. New traffic on that xlator will start coming from this time
onwards.
- Code
Q & A

More Related Content

PPTX
Autosupport email sending failed issue netapp cluster mode-
Saroj Sahu
 
TXT
Ifr tool log
boxbandit
 
PPTX
Interceptor in mule
Son Nguyen
 
PPTX
NetScaler Web2.0 Push Technology Overview
kvamsi
 
PPTX
04 22-2018-tcpdump red-80
Alexander Bitar
 
PDF
MMS Automation In Action!
MongoDB
 
PDF
Autobots @ REA
ggiesemann
 
PDF
Analyzing network packets Using Wireshark
SmrutiRanjanBiswal9
 
Autosupport email sending failed issue netapp cluster mode-
Saroj Sahu
 
Ifr tool log
boxbandit
 
Interceptor in mule
Son Nguyen
 
NetScaler Web2.0 Push Technology Overview
kvamsi
 
04 22-2018-tcpdump red-80
Alexander Bitar
 
MMS Automation In Action!
MongoDB
 
Autobots @ REA
ggiesemann
 
Analyzing network packets Using Wireshark
SmrutiRanjanBiswal9
 

Similar to Glusterfs session #7 client, server interactions (20)

PPT
Server and its both type concurrent and iterattive.ppt
Meenakshi Raheja
 
PPT
Np unit iii
vamsitricks
 
DOCX
Internet
Jack Nicole
 
PPT
Concurrent Server and Iterative Server (1)-1.ppt
Meenakshi Raheja
 
DOCX
Running Head CLIENT SERVER AUTHENTICATIONHANDLING CONCURRENT CL.docx
joellemurphey
 
PDF
How a network connection is created A network connection is initi.pdf
arccreation001
 
PPT
Remote Procedure Call
MNM Jain Engineering College
 
PPTX
Zookeeper Architecture
Prasad Wali
 
PPTX
PIW ISE best practices
Sergey Kucherenko
 
PPTX
Difference between Client Polling vs Server Push vs Websocket vs Long Polling
jeetendra mandal
 
PDF
Web and internet technology notes for BCA students
nawejakhatar10063
 
PPT
many many many many server types all there
Meenakshi Raheja
 
PDF
Python - User Account System with Token Based Authentication and Encrypted Ne...
IlamparithiM3
 
PPTX
Weblogic server cluster
Anandraj Kulkarni
 
PPTX
RPC: Remote procedure call
Sunita Sahu
 
PDF
Continuation_alan_20220503.pdf
Shen yifeng
 
PPTX
Game Networking for Online games
Minh Nghiem
 
PPTX
F5 Monitoring System (On Premise & Cloud Solution)
Tolga Ercan
 
PDF
Transaction TCP
amardeepsingh1902
 
PPTX
Socket网络编程
qhm123
 
Server and its both type concurrent and iterattive.ppt
Meenakshi Raheja
 
Np unit iii
vamsitricks
 
Internet
Jack Nicole
 
Concurrent Server and Iterative Server (1)-1.ppt
Meenakshi Raheja
 
Running Head CLIENT SERVER AUTHENTICATIONHANDLING CONCURRENT CL.docx
joellemurphey
 
How a network connection is created A network connection is initi.pdf
arccreation001
 
Remote Procedure Call
MNM Jain Engineering College
 
Zookeeper Architecture
Prasad Wali
 
PIW ISE best practices
Sergey Kucherenko
 
Difference between Client Polling vs Server Push vs Websocket vs Long Polling
jeetendra mandal
 
Web and internet technology notes for BCA students
nawejakhatar10063
 
many many many many server types all there
Meenakshi Raheja
 
Python - User Account System with Token Based Authentication and Encrypted Ne...
IlamparithiM3
 
Weblogic server cluster
Anandraj Kulkarni
 
RPC: Remote procedure call
Sunita Sahu
 
Continuation_alan_20220503.pdf
Shen yifeng
 
Game Networking for Online games
Minh Nghiem
 
F5 Monitoring System (On Premise & Cloud Solution)
Tolga Ercan
 
Transaction TCP
amardeepsingh1902
 
Socket网络编程
qhm123
 
Ad

More from Pranith Karampuri (16)

PDF
Glusterfs session #18 intro to fuse and its trade offs
Pranith Karampuri
 
PDF
Glusterfs session #12 locks xlator posixlk
Pranith Karampuri
 
PDF
Glusterfs session #17 self heal daemon data, metadata, entry healing
Pranith Karampuri
 
PDF
Glusterfs session #16 self-heal daemon ( for replication)
Pranith Karampuri
 
PDF
Glusterfs session #14 replication update fops
Pranith Karampuri
 
PDF
Glusterfs session #13 replication introduction
Pranith Karampuri
 
PDF
Glusterfs session #11 locks xlator entrylks
Pranith Karampuri
 
PDF
Glusterfs session #10 locks xlator inodelks
Pranith Karampuri
 
PDF
Glusterfs session #9 index xlator
Pranith Karampuri
 
PDF
Glusterfs session #8 memory tracking infra, io-threads
Pranith Karampuri
 
PDF
Gluster dev session #6 understanding gluster's network communication layer
Pranith Karampuri
 
PDF
Glusterfs session #5 inode t, fd-t lifecycles
Pranith Karampuri
 
PDF
Glusterfs session #4 call frame and programming model
Pranith Karampuri
 
PDF
Gluster dev session #3 xlator interface
Pranith Karampuri
 
PDF
Glusterfs session #2 1 layer above disk filesystems
Pranith Karampuri
 
PDF
Glusterfs session #1 disk filesystems
Pranith Karampuri
 
Glusterfs session #18 intro to fuse and its trade offs
Pranith Karampuri
 
Glusterfs session #12 locks xlator posixlk
Pranith Karampuri
 
Glusterfs session #17 self heal daemon data, metadata, entry healing
Pranith Karampuri
 
Glusterfs session #16 self-heal daemon ( for replication)
Pranith Karampuri
 
Glusterfs session #14 replication update fops
Pranith Karampuri
 
Glusterfs session #13 replication introduction
Pranith Karampuri
 
Glusterfs session #11 locks xlator entrylks
Pranith Karampuri
 
Glusterfs session #10 locks xlator inodelks
Pranith Karampuri
 
Glusterfs session #9 index xlator
Pranith Karampuri
 
Glusterfs session #8 memory tracking infra, io-threads
Pranith Karampuri
 
Gluster dev session #6 understanding gluster's network communication layer
Pranith Karampuri
 
Glusterfs session #5 inode t, fd-t lifecycles
Pranith Karampuri
 
Glusterfs session #4 call frame and programming model
Pranith Karampuri
 
Gluster dev session #3 xlator interface
Pranith Karampuri
 
Glusterfs session #2 1 layer above disk filesystems
Pranith Karampuri
 
Glusterfs session #1 disk filesystems
Pranith Karampuri
 
Ad

Recently uploaded (20)

PDF
The-Invisible-Living-World-Beyond-Our-Naked-Eye chapter 2.pdf/8th science cur...
Sandeep Swamy
 
PPTX
CARE OF UNCONSCIOUS PATIENTS .pptx
AneetaSharma15
 
DOCX
Action Plan_ARAL PROGRAM_ STAND ALONE SHS.docx
Levenmartlacuna1
 
PPTX
HISTORY COLLECTION FOR PSYCHIATRIC PATIENTS.pptx
PoojaSen20
 
PPTX
Artificial-Intelligence-in-Drug-Discovery by R D Jawarkar.pptx
Rahul Jawarkar
 
PDF
Review of Related Literature & Studies.pdf
Thelma Villaflores
 
PDF
Health-The-Ultimate-Treasure (1).pdf/8th class science curiosity /samyans edu...
Sandeep Swamy
 
PDF
Sunset Boulevard Student Revision Booklet
jpinnuck
 
PDF
RA 12028_ARAL_Orientation_Day-2-Sessions_v2.pdf
Seven De Los Reyes
 
PDF
BÀI TẬP TEST BỔ TRỢ THEO TỪNG CHỦ ĐỀ CỦA TỪNG UNIT KÈM BÀI TẬP NGHE - TIẾNG A...
Nguyen Thanh Tu Collection
 
PPTX
FSSAI (Food Safety and Standards Authority of India) & FDA (Food and Drug Adm...
Dr. Paindla Jyothirmai
 
PDF
1.Natural-Resources-and-Their-Use.ppt pdf /8th class social science Exploring...
Sandeep Swamy
 
PDF
UTS Health Student Promotional Representative_Position Description.pdf
Faculty of Health, University of Technology Sydney
 
DOCX
Unit 5: Speech-language and swallowing disorders
JELLA VISHNU DURGA PRASAD
 
PDF
What is CFA?? Complete Guide to the Chartered Financial Analyst Program
sp4989653
 
PDF
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
 
PDF
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
PDF
Phylum Arthropoda: Characteristics and Classification, Entomology Lecture
Miraj Khan
 
PPTX
Information Texts_Infographic on Forgetting Curve.pptx
Tata Sevilla
 
PDF
2.Reshaping-Indias-Political-Map.ppt/pdf/8th class social science Exploring S...
Sandeep Swamy
 
The-Invisible-Living-World-Beyond-Our-Naked-Eye chapter 2.pdf/8th science cur...
Sandeep Swamy
 
CARE OF UNCONSCIOUS PATIENTS .pptx
AneetaSharma15
 
Action Plan_ARAL PROGRAM_ STAND ALONE SHS.docx
Levenmartlacuna1
 
HISTORY COLLECTION FOR PSYCHIATRIC PATIENTS.pptx
PoojaSen20
 
Artificial-Intelligence-in-Drug-Discovery by R D Jawarkar.pptx
Rahul Jawarkar
 
Review of Related Literature & Studies.pdf
Thelma Villaflores
 
Health-The-Ultimate-Treasure (1).pdf/8th class science curiosity /samyans edu...
Sandeep Swamy
 
Sunset Boulevard Student Revision Booklet
jpinnuck
 
RA 12028_ARAL_Orientation_Day-2-Sessions_v2.pdf
Seven De Los Reyes
 
BÀI TẬP TEST BỔ TRỢ THEO TỪNG CHỦ ĐỀ CỦA TỪNG UNIT KÈM BÀI TẬP NGHE - TIẾNG A...
Nguyen Thanh Tu Collection
 
FSSAI (Food Safety and Standards Authority of India) & FDA (Food and Drug Adm...
Dr. Paindla Jyothirmai
 
1.Natural-Resources-and-Their-Use.ppt pdf /8th class social science Exploring...
Sandeep Swamy
 
UTS Health Student Promotional Representative_Position Description.pdf
Faculty of Health, University of Technology Sydney
 
Unit 5: Speech-language and swallowing disorders
JELLA VISHNU DURGA PRASAD
 
What is CFA?? Complete Guide to the Chartered Financial Analyst Program
sp4989653
 
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
 
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
Phylum Arthropoda: Characteristics and Classification, Entomology Lecture
Miraj Khan
 
Information Texts_Infographic on Forgetting Curve.pptx
Tata Sevilla
 
2.Reshaping-Indias-Political-Map.ppt/pdf/8th class social science Exploring S...
Sandeep Swamy
 

Glusterfs session #7 client, server interactions

  • 1. Glusterfs Session #7 client, server interactions
  • 2. Scope - Server init with all programs - Client Connection - interaction with server xlator - Client disconnection - interaction with server xlator - Client reconnection - interaction with server xlator
  • 3. Server init - Server xlator sets up auth and programs it supports in the initialization of the translator - Demo server_init
  • 4. Client connection - On Graph’s PARENT_UP notification rpc-clnt starts connecting to the brick. - Client first connects to glusterd on the node where the brick is located. - Once the connection is successful client asks glusterd for the port the brick is running on - Once it gets the port information, connection with glusterd is disconnected. - Connection to the brick is established with the port information received from glusterd
  • 5. Client connection - continued - After successful connection with the brick - DUMP_OP rpc is sent to the brick to get the supported programs and their versions - Decides the version it will use for the fop rpcs v3 vs v4, newer clients go for v4 if the server has the support, otherwise v3. - HNDSHK_SETVOLUME rpc is sent now with the credentials and options the clients wants from the server - If server accepts the SETVOLUME, we have a successful connection on which glusterfs rpcs can be sent.
  • 6. Client connection - continued - Server will setup the necessary structures(client_t) to make sure the resources can be cleaned up in case there is a disconnect. - Client_t data structure Code
  • 7. Client disconnection - Client can disconnect because of the following reasons - Explicit disconnect either from client(graph switch) or server(auth changes) - Process dying - client/server Machine shutting off - Network issues - On client - all the open fds are marked bad, further fops on these fds would fail with EBADF. - Reconnection timers are started which would attempt reconnection.
  • 8. Client disconnection - continued - On disconnect server will get a disconnect event and server_rpc_notify will - cleanup all the resources like locks, open fds. - All the ongoing requests will be errored while responding because the socket is disconnected - Structures corresponding to the connection will be cleaned up - Client_destroy, client_disconnect callbacks are called for each xlator - Code
  • 9. Client reconnection - If client disconnected from server but the client process is still running, then client will keep trying to reconnect every 3 seconds. - Each connection attempt would be similar to the connection sequence. The only difference would be the client connection id will have the reconnection number incremented - Once the connection is restored client tries to recover the resources on the connection like open fds. At the moment locks are not restored.
  • 10. Client reconnection - continued - For all the fds that are marked bad in client, a reopen request is sent to the server. This is best-effort. If reopens for any files/directories fail the fd would still be bad and would continue to give EBADF. - Once re-opens are completed the client xlator will notify the parents CHILD_UP event. New traffic on that xlator will start coming from this time onwards. - Code
  • 11. Q & A