Bitcoin Forum
April 25, 2024, 08:19:58 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Ideal Bitcoind Server Setup for Zero Downtime?  (Read 1092 times)
Miitch (OP)
Full Member
***
Offline Offline

Activity: 126
Merit: 100


View Profile
November 04, 2014, 08:09:25 AM
 #1

I'm working on a new project. It's an online gambling game where players deposit funds into bitcoin addresses that are tracked/monitored by bitcoind on a VPS. I need some help with designing a setup where there is total redundancy (i.e. no single point of failure).

There are three core systems that I want to have 100% uptime of:
- bitcoind
- MySQL
- Apache (http)

In the past I have had problems with system downtime... What I want to do is setup a system so that 2 (or more) VPS servers have a perfect sync of bitcoind, MySQL and http files. It's fairly straight forward with http and MySQL:
- MySQL I can setup master-master replication
- http I can sync the web files with rsync

But bitcoind is a real struggle. As far as I know you can only backup the wallet.dat when bitcoind is shutdown. So to do a sync of the wallet.dat my script must shutdown bitcoind, copy/paste wallet.dat to a backup, restart bitcoind. As this can all take some time (stopping takes 30~ seconds and starting can take 2~ minutes) and no deposits can be processed during this time I am wanting a better solution... Is there a way I could run bitcoind on two VPS servers and load balance between them? My fear is that when bitcoind generates a fresh 100~ addresses in one wallet it might also generate a fresh 100~ addresses in the other wallet and they would go out of sync!

Does anyone have any ideas for the proper way to set this up? How do big sites like Primedice do it?

I'm also looking for suggestions of reliable non-US VPS providers that accept Bitcoin as payment!


▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇   COIN-SWEEPER
▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇    Avoid Bombs Win BIG
▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇   1% House Edge   ▇ ▇ ▇ ▇ ▇ ▇ ▇
1714033198
Hero Member
*
Offline Offline

Posts: 1714033198

View Profile Personal Message (Offline)

Ignore
1714033198
Reply with quote  #2

1714033198
Report to moderator
1714033198
Hero Member
*
Offline Offline

Posts: 1714033198

View Profile Personal Message (Offline)

Ignore
1714033198
Reply with quote  #2

1714033198
Report to moderator
TalkImg was created especially for hosting images on bitcointalk.org: try it next time you want to post an image
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714033198
Hero Member
*
Offline Offline

Posts: 1714033198

View Profile Personal Message (Offline)

Ignore
1714033198
Reply with quote  #2

1714033198
Report to moderator
1714033198
Hero Member
*
Offline Offline

Posts: 1714033198

View Profile Personal Message (Offline)

Ignore
1714033198
Reply with quote  #2

1714033198
Report to moderator
topman21
Legendary
*
Offline Offline

Activity: 1176
Merit: 1056



View Profile
November 04, 2014, 02:04:43 PM
 #2

I use ovh VPS for my online wallet and I have never had any issues, all very good as far as im concerned

██▄     ▄▄░
▀██▄ ▄██▀
▄▄███████████████████▄▄
▄█████▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█████▄
████▀                   ▀████
████       ▄▄█████▄▄  ▀▄   ████
████      ▄██████████▄▀    ████
████      ████████▀▀       ████
████  ▄▀ ▄██▀▀▀   ▄██      ████
████   ▀▀     ▄▄███▀       ████
████▄                   ▄████
▀█████▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█████▀
▀▀███████████████████▀▀
.
SECONDLIVE
.
CHOOSE LIFE      CHOOSE SPACE      CHOOSE FRIENDS
.
                           Twitter       Telegram      Medium      YouTube      Discord        TikTok         GitHub               
        ▄▄███████▄▄▄
    ▄▄████████████████▄▄
   ████████████████████▄
  ███████▀▀▀█████████████
 ██████▌     ▀████████████
███████▀ ▀▀▄▄██▀▀▀█████████
██████             ▀███████
██████▄             ███████
 ███████▄▄        ▄███████
  ███████████▄▄▄▄█████████
   ▀███████████████████▀
     ▀████████████████▀▀
   ██████████████████████
neha
Full Member
***
Offline Offline

Activity: 168
Merit: 100


View Profile WWW
November 04, 2014, 06:54:13 PM
 #3

I'm working on a new project. It's an online gambling game where players deposit funds into bitcoin addresses that are tracked/monitored by bitcoind on a VPS. I need some help with designing a setup where there is total redundancy (i.e. no single point of failure).

There are three core systems that I want to have 100% uptime of:
- bitcoind
- MySQL
- Apache (http)

In the past I have had problems with system downtime... What I want to do is setup a system so that 2 (or more) VPS servers have a perfect sync of bitcoind, MySQL and http files. It's fairly straight forward with http and MySQL:
- MySQL I can setup master-master replication
- http I can sync the web files with rsync

But bitcoind is a real struggle. As far as I know you can only backup the wallet.dat when bitcoind is shutdown. So to do a sync of the wallet.dat my script must shutdown bitcoind, copy/paste wallet.dat to a backup, restart bitcoind. As this can all take some time (stopping takes 30~ seconds and starting can take 2~ minutes) and no deposits can be processed during this time I am wanting a better solution... Is there a way I could run bitcoind on two VPS servers and load balance between them? My fear is that when bitcoind generates a fresh 100~ addresses in one wallet it might also generate a fresh 100~ addresses in the other wallet and they would go out of sync!

Does anyone have any ideas for the proper way to set this up? How do big sites like Primedice do it?

I'm also looking for suggestions of reliable non-US VPS providers that accept Bitcoin as payment!



You dont need to backup every second. As long as you have pregenerated the addresses in the pool before like lets say 100000, you only need to backup when you refill again. Dont put the command in the conf as it will automatically refill if you enter your passphrase.

Miitch (OP)
Full Member
***
Offline Offline

Activity: 126
Merit: 100


View Profile
November 08, 2014, 08:36:56 AM
 #4

Thanks for the replies! Appreciated!

▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇   COIN-SWEEPER
▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇    Avoid Bombs Win BIG
▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇   1% House Edge   ▇ ▇ ▇ ▇ ▇ ▇ ▇
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!