redis 主从数据更新

未分类 xiaogua 351℃ 0评论

master 日志


1:M 28 Jun 09:40:54.927 - DB 0: 7 keys (0 volatile) in 8 slots HT.
1:M 28 Jun 09:40:54.927 - 1 clients connected (0 slaves), 349084752 bytes in use
1:M 28 Jun 09:40:56.939 - Accepted 127.0.0.1:51404
1:M 28 Jun 09:40:56.940 * Slave 127.0.0.1:6380 asks for synchronization
1:M 28 Jun 09:40:56.940 * Full resync requested by slave 127.0.0.1:6380
1:M 28 Jun 09:40:56.940 * Starting BGSAVE for SYNC with target: disk
1:M 28 Jun 09:40:56.947 * Background saving started by pid 174
1:M 28 Jun 09:40:58.334 - Accepted 127.0.0.1:51406
1:M 28 Jun 09:40:58.335 * Slave 127.0.0.1:6381 asks for synchronization
1:M 28 Jun 09:40:58.335 * Full resync requested by slave 127.0.0.1:6381
1:M 28 Jun 09:40:58.335 * Waiting for end of BGSAVE for SYNC
1:M 28 Jun 09:40:59.937 - DB 0: 7 keys (0 volatile) in 8 slots HT.
1:M 28 Jun 09:40:59.937 - 1 clients connected (2 slaves), 349126592 bytes in use
1:M 28 Jun 09:41:04.947 - DB 0: 7 keys (0 volatile) in 8 slots HT.
1:M 28 Jun 09:41:04.947 - 1 clients connected (2 slaves), 349126592 bytes in use
174:C 28 Jun 09:41:05.759 * DB saved on disk
174:C 28 Jun 09:41:05.767 * RDB: 0 MB of memory used by copy-on-write
1:M 28 Jun 09:41:05.849 * Background saving terminated with success
1:M 28 Jun 09:41:06.499 * Synchronization with slave 127.0.0.1:6380 succeeded
1:M 28 Jun 09:41:06.499 * Synchronization with slave 127.0.0.1:6381 succeeded
1:M 28 Jun 09:41:09.999 - DB 0: 7 keys (0 volatile) in 8 slots HT.
1:M 28 Jun 09:41:09.999 - 1 clients connected (2 slaves), 349126592 bytes in use
1:M 28 Jun 09:41:15.022 - DB 0: 7 keys (0 volatile) in 8 slots HT.

从redis日志

330MB只用了5秒钟


146:M 28 Jun 09:40:55.937 - DB 0: 7 keys (0 volatile) in 8 slots HT.
146:M 28 Jun 09:40:55.937 - 1 clients connected (0 slaves), 322723408 bytes in use
146:S 28 Jun 09:40:56.939 * SLAVE OF 127.0.0.1:6379 enabled (user request from 'id=2 addr=127.0.0.1:47084 fd=7 name= age=35 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=32768 obl=0 oll=0 omem=0 events=r cmd=slaveof')
146:S 28 Jun 09:40:56.939 * Connecting to MASTER 127.0.0.1:6379
146:S 28 Jun 09:40:56.939 * MASTER <-> SLAVE sync started
146:S 28 Jun 09:40:56.940 * Non blocking connect for SYNC fired the event.
146:S 28 Jun 09:40:56.940 * Master replied to PING, replication can continue...
146:S 28 Jun 09:40:56.940 * Partial resynchronization not possible (no cached master)
146:S 28 Jun 09:40:56.949 * Full resync from master: bd1989593ceecd7e4e22dd68d34c7b01a8d51ffe:219950046
146:S 28 Jun 09:41:00.946 - DB 0: 7 keys (0 volatile) in 8 slots HT.
146:S 28 Jun 09:41:00.947 - 1 clients connected (0 slaves), 322723664 bytes in use
146:S 28 Jun 09:41:05.850 * MASTER <-> SLAVE sync: receiving 54444637 bytes from master
146:S 28 Jun 09:41:05.956 - DB 0: 7 keys (0 volatile) in 8 slots HT.
146:S 28 Jun 09:41:05.956 - 1 clients connected (0 slaves), 322723664 bytes in use
146:S 28 Jun 09:41:06.509 * MASTER <-> SLAVE sync: Flushing old data
146:S 28 Jun 09:41:08.804 * MASTER <-> SLAVE sync: Loading DB in memory
146:S 28 Jun 09:41:08.804 . Unrecognized RDB AUX field: 'redis-ver'
146:S 28 Jun 09:41:08.804 . Unrecognized RDB AUX field: 'redis-bits'
146:S 28 Jun 09:41:08.804 . Unrecognized RDB AUX field: 'ctime'
146:S 28 Jun 09:41:08.804 . Unrecognized RDB AUX field: 'used-mem'
146:S 28 Jun 09:41:11.512 * MASTER <-> SLAVE sync: Finished with success
146:S 28 Jun 09:41:11.539 * Background append only file rewriting started by pid 175
146:S 28 Jun 09:41:14.072 * AOF rewrite child asks to stop sending diffs.
175:C 28 Jun 09:41:14.073 * Parent agreed to stop sending diffs. Finalizing AOF...
175:C 28 Jun 09:41:14.073 * Concatenating 0.00 MB of AOF diff received from parent.
175:C 28 Jun 09:41:14.073 * SYNC append only file rewrite performed
175:C 28 Jun 09:41:14.080 * AOF rewrite: 2 MB of memory used by copy-on-write
146:S 28 Jun 09:41:14.149 * Background AOF rewrite terminated with success
146:S 28 Jun 09:41:14.149 * Residual parent diff successfully flushed to the rewritten AOF (0.00 MB)
146:S 28 Jun 09:41:14.149 * Background AOF rewrite finished successfully
146:S 28 Jun 09:41:14.149 - Background AOF rewrite signal handler took 320us
146:S 28 Jun 09:41:15.953 - DB 0: 7 keys (0 volatile) in 8 slots HT.

 

转载请注明:南瓜的小窝 » redis 主从数据更新

喜欢 (0)
发表我的评论
取消评论
表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址