Cross-server
Several servers can share one auction house. A listing made on one server can be bought on any other.
- Set
type:understorage:tomysql,mariadbormongodbon every server, with the same database andtable-prefix. - Set
enabled: trueundernetwork:and the same Redis server andchannelon every server. - Give each server its own
server-name: "survival"undernetwork:. - Restart every server.
storage:
type: mysql
network:
enabled: true
server-name: "survival"
channel: "auctionhouse"
redis:
host: 10.0.0.5
port: 6379- The database decides every sale, so an item can only be sold once even when players on different servers click it at the same moment.
- Redis tells the other servers what changed, so menus update right away.
- Sellers are paid on the server they are on. Offline sellers are paid when they next join.
- SQLite can’t be shared. Cross-server mode is turned off with a warning if
type: sqliteunderstorage:is set.
MongoDB
Use a MongoDB replica set if you can. Purchases are then saved in a single transaction. On a single standalone MongoDB server a failed save is written to the console with the item data so you can give it back.