Skip to content

Instantly share code, notes, and snippets.

@ebuildy
Last active September 17, 2018 16:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ebuildy/9fe004546590a8e9c457da07e247046f to your computer and use it in GitHub Desktop.
Save ebuildy/9fe004546590a8e9c457da07e247046f to your computer and use it in GitHub Desktop.
strace of couchbase moxi proxy - 3 nodes cluster - "GET test_1" operation
[pid 219] accept(41, {sa_family=AF_INET, sin_port=htons(45182), sin_addr=inet_addr("192.168.160.1")}, [16]) = 43
[pid 219] sendto(32, "\0", 1, 0, NULL, 0) = 1
[pid 273] recvfrom(31, "\0", 1, 0, NULL, NULL) = 1
[pid 273] recvfrom(43, "\200\r\0\6\0\0\0\0\0\0\0\6\0\1\0\0\0\0\0\0\0\0\0\0test_1\200\n\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\0\0\0\0\0\0\0", 2048, 0, NULL, NULL) = 54
[pid 273] socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 51
[pid 273] connect(51, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("127.0.0.11")}, 16) = 0
[pid 273] sendmmsg(51, {{{msg_name(0)=NULL, msg_iov(1)=[{"\240o\1\0\0\1\0\0\0\0\0\0\7server3\3poc\0\0\1\0\1", 29}], msg_controllen=0, msg_flags=0}, 29}, {{msg_name(0)=NULL, msg_iov(1)=[{"\274\345\1\0\0\1\0\0\0\0\0\0\7server3\3poc\0\0\34\0\1", 29}], msg_controllen=0, msg_flags=0}, 29}}, 2, MSG_NOSIGNAL) = 2
[pid 273] recvfrom(51, "\274\345\201\200\0\1\0\0\0\0\0\0\7server3\3poc\0\0\34\0\1", 2048, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("127.0.0.11")}, [16]) = 29
[pid 273] recvfrom(51, "\240o\201\200\0\1\0\1\0\0\0\0\7server3\3poc\0\0\1\0\1\7server3\3poc\0\0\1\0\1\0\0\2X\0\4\300\250\240\4", 65536, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("127.0.0.11")}, [16]) = 56
[pid 273] socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 51
[pid 273] setsockopt(51, SOL_TCP, TCP_NODELAY, [1], 4) = 0
[pid 273] connect(51, {sa_family=AF_INET, sin_port=htons(11210), sin_addr=inet_addr("192.168.160.4")}, 16) = -1 EINPROGRESS (Operation now in progress)
[pid 273] getsockopt(51, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
[pid 273] sendto(51, "\200!\0\5\0\0\0\0\0\0\0+\0\0\0\0\0\0\0\0\0\0\0\0", 24, 0, NULL, 0) = 24
[pid 273] sendto(51, "PLAIN\0mem2\0d2bf28814c581c6d2781cf48e2c12bee", 43, 0, NULL, 0) = 43
[pid 273] socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 52
[pid 273] connect(52, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("127.0.0.11")}, 16) = 0
[pid 273] sendmmsg(52, {{{msg_name(0)=NULL, msg_iov(1)=[{"\361?\1\0\0\1\0\0\0\0\0\0\7server2\3poc\0\0\1\0\1", 29}], msg_controllen=0, msg_flags=0}, 29}, {{msg_name(0)=NULL, msg_iov(1)=[{"\360\237\1\0\0\1\0\0\0\0\0\0\7server2\3poc\0\0\34\0\1", 29}], msg_controllen=0, msg_flags=0}, 29}}, 2, MSG_NOSIGNAL) = 2
[pid 273] recvfrom(52, "\360\237\201\200\0\1\0\0\0\0\0\0\7server2\3poc\0\0\34\0\1", 2048, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("127.0.0.11")}, [16]) = 29
[pid 273] recvfrom(52, "\361?\201\200\0\1\0\1\0\0\0\0\7server2\3poc\0\0\1\0\1\7server2\3poc\0\0\1\0\1\0\0\2X\0\4\300\250\240\3", 65536, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("127.0.0.11")}, [16]) = 56
[pid 273] socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 52
[pid 273] setsockopt(52, SOL_TCP, TCP_NODELAY, [1], 4) = 0
[pid 273] connect(52, {sa_family=AF_INET, sin_port=htons(11210), sin_addr=inet_addr("192.168.160.3")}, 16) = -1 EINPROGRESS (Operation now in progress)
[pid 273] getsockopt(52, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
[pid 273] sendto(52, "\200!\0\5\0\0\0\0\0\0\0+\0\0\0\0\0\0\0\0\0\0\0\0", 24, 0, NULL, 0) = 24
[pid 273] sendto(52, "PLAIN\0mem2\0d2bf28814c581c6d2781cf48e2c12bee", 43, 0, NULL, 0) = 43
[pid 273] socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 53
[pid 273] setsockopt(53, SOL_TCP, TCP_NODELAY, [1], 4) = 0
[pid 273] connect(53, {sa_family=AF_INET, sin_port=htons(11210), sin_addr=inet_addr("192.168.160.2")}, 16) = -1 EINPROGRESS (Operation now in progress)
[pid 273] getsockopt(53, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
[pid 273] sendto(53, "\200!\0\5\0\0\0\0\0\0\0+\0\0\0\0\0\0\0\0\0\0\0\0", 24, 0, NULL, 0) = 24
[pid 273] sendto(53, "PLAIN\0mem2\0d2bf28814c581c6d2781cf48e2c12bee", 43, 0, NULL, 0) = 43
[pid 273] sendmsg(53, {msg_name(16)={sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, msg_iov(2)=[{"\200\r\0\6\0\0\0\0\0\0\0\6\0\1\0\0\0\0\0\0\0\0\0\0test_1", 30}, {"\200\n\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\0\0\0\0\0\0\0", 24}], msg_controllen=0, msg_flags=0}, 0) = 54
[pid 273] sendmsg(51, {msg_name(16)={sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, msg_iov(1)=[{"\200\n\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\0\0\0\0\0\0\0", 24}], msg_controllen=0, msg_flags=0}, 0) = 24
[pid 273] sendmsg(52, {msg_name(16)={sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, msg_iov(1)=[{"\200\n\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\0\0\0\0\0\0\0", 24}], msg_controllen=0, msg_flags=0}, 0) = 24
[pid 273] recvfrom(53, "\201\r\0\6\4\0\0\0\0\0\0\16\0\1\0\0\0\0\0\0\0\0\0\1\0\0\0\0test_1toto\201\n\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\0\0\0\0\0\0\0", 2048, 0, NULL, NULL) = 62
[pid 273] recvfrom(51, "\201\n\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\0\0\0\0\0\0\0", 2048, 0, NULL, NULL) = 24
[pid 273] recvfrom(52, "\201\n\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\0\0\0\0\0\0\0", 2048, 0, NULL, NULL) = 24
[pid 273] sendmsg(43, {msg_name(16)={sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, msg_iov(2)=[{"\201\r\0\6\4\0\0\0\0\0\0\16\0\1\0\0\0\0\0\0\0\0\0\1\0\0\0\0test_1toto", 38}, {"\201\n\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\0\0\0\0\0\0\0", 24}], msg_controllen=0, msg_flags=0}, 0) = 62
[pid 273] recvfrom(43, "\200\7\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0\0\0\0\0\0\0\0", 2048, 0, NULL, NULL) = 24
[pid 273] sendmsg(43, {msg_name(16)={sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, msg_iov(1)=[{"\201\7\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0\0\0\0\0\0\0\0", 24}], msg_controllen=0, msg_flags=0}, 0) = 24
[pid 219] accept(41, {sa_family=AF_INET, sin_port=htons(45430), sin_addr=inet_addr("192.168.160.1")}, [16]) = 43
[pid 219] sendto(11, "\0", 1, 0, NULL, 0) = 1
[pid 270] recvfrom(10, "\0", 1, 0, NULL, NULL) = 1
[pid 270] recvfrom(43, "\200\r\0\6\0\0\0\0\0\0\0\6\0\1\0\0\0\0\0\0\0\0\0\0test_1\200\n\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\0\0\0\0\0\0\0", 2048, 0, NULL, NULL) = 54
[pid 270] sendmsg(46, {msg_name(16)={sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, msg_iov(2)=[{"\200\r\0\6\0\0\0\0\0\0\0\6\0\1\0\0\0\0\0\0\0\0\0\0test_1", 30}, {"\200\n\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\0\0\0\0\0\0\0", 24}], msg_controllen=0, msg_flags=0}, 0) = 54
[pid 270] sendmsg(44, {msg_name(16)={sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, msg_iov(1)=[{"\200\n\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\0\0\0\0\0\0\0", 24}], msg_controllen=0, msg_flags=0}, 0) = 24
[pid 270] sendmsg(45, {msg_name(16)={sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, msg_iov(1)=[{"\200\n\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\0\0\0\0\0\0\0", 24}], msg_controllen=0, msg_flags=0}, 0) = 24
[pid 270] recvfrom(46, "\201\r\0\6\4\0\0\0\0\0\0\16\0\1\0\0\0\0\0\0\0\0\0\2\0\0\0\0test_1toto\201\n\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\0\0\0\0\0\0\0", 2048, 0, NULL, NULL) = 62
[pid 270] recvfrom(45, "\201\n\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\0\0\0\0\0\0\0", 2048, 0, NULL, NULL) = 24
[pid 270] recvfrom(44, "\201\n\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\0\0\0\0\0\0\0", 2048, 0, NULL, NULL) = 24
[pid 270] sendmsg(43, {msg_name(16)={sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, msg_iov(2)=[{"\201\r\0\6\4\0\0\0\0\0\0\16\0\1\0\0\0\0\0\0\0\0\0\2\0\0\0\0test_1toto", 38}, {"\201\n\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\0\0\0\0\0\0\0", 24}], msg_controllen=0, msg_flags=0}, 0) = 62
[pid 270] recvfrom(43, "\200\7\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0\0\0\0\0\0\0\0", 2048, 0, NULL, NULL) = 24
[pid 270] sendmsg(43, {msg_name(16)={sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, msg_iov(1)=[{"\201\7\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0\0\0\0\0\0\0\0", 24}], msg_controllen=0, msg_flags=0}, 0) = 24
@ebuildy
Copy link
Author

ebuildy commented Sep 17, 2018

  • 192.168.160.1: "client"
  • 127.0.0.11: Docker DNS service
  • 192.168.160.2: node 1
  • 192.168.160.3: node 2
  • 192.168.160.4: node 3

I ask for "test_1" key, that contains "toto" from Php client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment