Background

  • Deploy Pattern
  • 3 sentinels
  • 1 master
  • 1 slave
  • Env
  • Kubernetes 1.7
  • DataNode : Statefulset
  • SentinelNode: Statefulset
  • Status default

Phenomenon

According to the documentation of sentinel, I know some points as below:

  1. Sentinel implements the service-discover through the messages come from the channel called sentinel:Hello in the master node which is monitored by sentinels
  2. The communication between sentinels can be used in failover

But, I use the tool called tcpdump to capture the data which is sent to the stl-2 by stl-0. I found that there are some messages about __sentinel__:Hello.

The capture command is : tcpdump dst port 26379 and src 172.20.229.154 -w a.log

 Ôò¡^B^@^D^@^@^@^@^@^@^@^@^@^@^@^D^@^A^@^@^@N9h[¦T^C^@D^@^@^@D^@^@^@BuÃû!,6P¹Æ´é^H^@E^@^@6ßo@^@>^FÜ׬^Tå<9a>¬^TB·éËg^Kq^\^Dh<8d>ÉÆðP^X^@åÿ4^@^@*1^M
      2 $4^M
      3 PING^M
      4 N9h[®U^C^@6^@^@^@6^@^@^@BuÃû!,6P¹Æ´é^H^@E^@^@(ßp@^@>^FÜä¬^Tå<9a>¬^TB·éËg^Kq^\^Dv<8d>ÉÆ÷P^P^@å^SJ^@^@N9h[¼²^D^@Ð^@^@^@Ð^@^@^@BuÃû!,6P¹Æ´é^H^@E^@^@Âßq@^@>^FÜI¬^T        å<9a>¬^TB·éËg^Kq^\^Dv<8d>ÉÆ÷P^X^@å±M^@^@*3^M
      5 $7^M
      6 PUBLISH^M
      7 $18^M
      8 __sentinel__:hello^M
      9 $104^M
     10 172.20.229.154,26379,89a4cdd2af680995e66a99c5b6764bb51da0134b,0,cantankerous-tuatara,172.20.45.22,6379,0^M
     11 N9h[^Z´^D^@6^@^@^@6^@^@^@BuÃû!,6P¹Æ´é^H^@E^@^@(ßr@^@>^FÜâ¬^Tå<9a>¬^TB·éËg^Kq^\^E^P<8d>ÉÆûP^P^@å^R¬^@^@O9h[éj^C^@D^@^@^@D^@^@^@BuÃû!,6P¹Æ´é^H^@E^@^@6ßs@^@>^FÜÓ¬        ^Tå<9a>¬^TB·éËg^Kq^\^E^P<8d>ÉÆûP^X^@åþ<81>^@^@*1^M
     12 $4^M
     13 PING^M
     14 O9h[ék^C^@6^@^@^@6^@^@^@BuÃû!,6P¹Æ´é^H^@E^@^@(ßt@^@>^FÜà¬^Tå<9a>¬^TB·éËg^Kq^\^E^^<8d>ÉÇ^BP^P^@å^R<97>^@^@P9h[Yß^D^@D^@^@^@D^@^@^@BuÃû!,6P¹Æ´é^H^@E^@^@6ßu@^@>^F        ÜѬ^Tå<9a>¬^TB·éËg^Kq^\^E^^<8d>ÉÇ^BP^X^@åþl^@^@*1^M
     15 $4^M
     16 PING^M
     17 P9h[\à^D^@6^@^@^@6^@^@^@BuÃû!,6P¹Æ´é^H^@E^@^@(ßv@^@>^FÜÞ¬^Tå<9a>¬^TB·éËg^Kq^\^E,<8d>ÉÇ  P^P^@å^R<82>^@^@P9h[3¶^E^@Ð^@^@^@Ð^@^@^@BuÃû!,6P¹Æ´é^H^@E^@^@Âßw@^@>^FÜ        C¬^Tå<9a>¬^TB·éËg^Kq^\^E,<8d>ÉÇ  P^X^@å°<85>^@^@*3^M
     18 $7^M
     19 PUBLISH^M
     20 $18^M
     21 __sentinel__:hello^M
     22 $104^M
     23 172.20.229.154,26379,89a4cdd2af680995e66a99c5b6764bb51da0134b,0,cantankerous-tuatara,172.20.45.22,6379,0^M

Question

So, Why the message about sentinel:hello was detected in the communication between sentinels? What effect about this message?

@antirez

Comment From: fengzixu

@antirez

Comment From: hwware

@fengzixu hello, each sentinel will publish message in the sentinel:hello channel for monitored masters and slaves in certain periods of time, it also subscribe the channel, therefore sentinels can known each other's exist and share certain information regarding sentinel instances and the monitored master information.