I am trying to build a private network on AWS (Amazon Web Service). Now the network is successfully built, but still remains some issue. Here is how I build the private network:
Start a EC2 instance:
- sudo yum install golang
- adding these to .bashrc:
- source .barshrc
- go get -u -d github.com/ipfs/go-ipfs
- cd $GOPATH/src/github.com/ipfs/go-ipfs
- make install
IPFS private network:
- ipfs init
- go get -u github.com/Kubuxu/go-ipfs-swarm-key-gen/ipfs-swarm-key-gen
- ipfs-swarm-key-gen > ~/.ipfs/swarm.key
Servers share the same key
- ipfs bootstrap rm --all
- ipfs id
- ipfs bootstrap add -----------------
- (ipfs swarm peers)
However, here is the problem: the file transmitting speed is about two times slower than on local machines.
When I say “slower” I am comparing it with performance of rsync in same environments. The private network I am building contains only two servers, so it should be a simple one-to-one transmitting, and the speed should be about the same as “rsync ssh”.
Here are some stats transmitting 1GB file from private network I build on my local machines, you could see from it that the real time is almost the same:
Local machine: rsync -avzhe ssh:
Local machine: ipfs pin add (a faster version of “ipfs get”, this will automatically pin the blocks you retrieve):
But when using AWS EC2, I tried both dedicated and shared tenancy, the speed of ipfs would be much slower than that of rsync:
AWS: rsync -avzhe ssh:
AWS: ipfs pin add:
As we could see, ipfs takes about double time to transmit the file.
I am currently working on this and trying to find out what makes the difference. I have already emailed AWS support, and was informed that they did not block ipfs intentionally, so there should not be such difference.
I wonder is there anyone who has experience with it, and maybe could let me know what is the cause of the situation. Below I attached info about the EC2 instance I created.