sepalani / MH3SP

Monster Hunter 3 (~tri) Server Project
GNU Affero General Public License v3.0
195 stars 19 forks source link

[Draft] Network scaling #104

Open sepalani opened 1 year ago

sepalani commented 1 year ago

Here are some thoughts regarding how we can scale up/down the server depending on our needs.

Ideally, we should aim toward a flexible/scalable approach for modest and robust targets. For instance, an old Windows XP vs a modern server. We should be able to redirect the traffic load across threads, processes, external servers... One task might consider to only process the accept'd socket then dispatch it or handle the whole connection.

Socket

Blocking I/O

Non-blocking I/O

SO_REUSEPORT option

Select

Poll

Load balancing

Threads

Processes

External servers

Synchronization

"Central server" refers to an info server centralizing data accessible/shared by multiple servers. Player's name/status/equipment/Capcom ID are considered as such. At some point, we should provide a way to register external servers.

Autonomous approach

Synchronizing approach