Use TsunamiUDP accelerated migration of room

deploy

Code required deployed as follows:

yum -y install automake autoconf

git clone git://github.com/rriley/tsunami-udp.git

cd tsunami-udp

./recompile.sh

cp server/tsunamid client/tsunami /usr/bin

Or downloaded from sf.net

wget http://iweb.dl.sourceforge.net/project/tsunami-udp/tsunami-udp/tsunami-v1.1-cvsbuild42/tsunami-v1.1-cvsbuild42.tar.gz

Unzip the downloaded file

tar zxf tsunami-v1.1-cvsbuild42.tar.gz
cd tsunami-udp-v11-b42

./recompile.sh

cp server/tsunamid client/tsunami /usr/bin

use

1. adjust the firewall

  1. ** server: ** open TCP 46224 (the default port)
  2. ** Client: ** open UDP 46224 (the default port)

2. Turn on the server

1. The file to be migrated are placed in / app / game_data directory (can also specify a single file transfer)

tsunamid --hbtimeout 60 /app/game_data/*

#PS: Here heartbeat packet timeout set to 60 seconds, default is 15 seconds, it is easy to use, the interrupt transmission fails

3. Turn on the client

  1. Pull server (122.225.100.100) of game_db.lz4 file, and speed 100M (under the recommended limits, otherwise the room was filled with the bandwidth oh)
tsunami set rate 100M connect 122.225.100.100 get gcmob_db.lz4
  1. Pull all the files in the directory
    tsunami set rate 100M connect 122.225.100.100 get *

3. Documentation

http://tsunami-udp.cvs.sourceforge.net/viewvc/tsunami-udp/docs/USAGE.txt

ps not avoid leaks, IP is randomly filled

Migration across the room example

Scene: The 14G migrate files from Hangzhou to Beijing room room

Method 1 Use wget to download

Room Migration Examples

Method 2. Use TsunamiUDP tool

Here Insert Picture Description

to sum up

TsunamiUDP too obvious advantages compared to wget, TsunamiUDP the bandwidth is able to run full speed and wget to boast about.
https://ops.m114.org/post/Use-TsunamiUDP-accelerate-migration-across-data-centers/

Published 12 original articles · won praise 0 · Views 438

Guess you like

Origin blog.csdn.net/qq_36523203/article/details/103211718