Bannerlord Online servers architecture

Status
Not open for further replies.
From time to time we receive messages asking us to tell you about the inner structure of Bannerlord Online servers and we decided to share this information, especially after a major change in the servers architecture.
Bannerlord Online servers are quite complex, like any MMO project, as they serve a large number of users.

At the start of Bannerlord Online development, we tried to use the code of the original game to speed up the initial development of the mod and get the first working version.
The first version of the server was running right inside the original game process and was a monolithic application, the scheme of which can be seen below:



This version worked until the middle of 2023, but with each passing day the performance decreased, primarily due to the fact that all fights were processed on one server and the entire log of players' actions was duplicated in the server RAM for quick access from our internal tools.

Screenshots showing the operation of the old version of the server (EU):



Battle replays were stored on the same server, on a separate disc. When downloading a replay, a separate load was applied to the server, which could also lead to short-term lags.


In July 2023, we completed the first part of the server code changes, and in December 2023, we made the final edits to our server code.
As a result, we completely abandoned the code of the original game, re-implemented all the necessary mechanics ourselves, and moved the servers to the Linux platform, which subsequently allowed us to open servers in Oceania as well as in Mainland China.
In addition, we have moved the calculation of battles to separate machines so that there are enough resources, even with a very high online, and the logs of player actions are not duplicated in RAM, so we do not need to constantly increase its capacity to save all new actions.

The current server architecture has become multi-service and looks something like this:



The scheme shows that we have moved the calculation of battles to separate machines and can increase their number if necessary, moved the processing of battle replays to unload the main server and began to store them in cloud storage from a third-party provider. Downloading of these replays is also done via the cloud, which allowed us to further unload our main server.
 
Status
Not open for further replies.