BungeeCord vs. LilyPad: what should I use?

tl;dr: they are functionally the same, and even use the same protocol.

I see this debate all too often, so I am going to clear it up. I am obviously biased, being an avid BungeeCord user, but I also do not advocate fearmongering, so I have decided to break things down. This post is based primarily on reading the source code of both proxies. Arguments thrown around by both camps are half-truths or down-right lies.

Misconception: BungeeCord does not scale.

This has little basis in reality. Often it is plugins that end up causing these scalability issues, which are not BungeeCord's fault.

Half-truth: BungeeCord is not efficient.

It depends on your definition of efficient. While BungeeCord can exhibit high CPU usage, it does so in a parallel fashion, which spreads the load across cores. In fact, you will notice that LilyPad also exhibits these characteristics. The common cause of "inefficiency" is bad plugin code running in the network I/O threads.

Misconception: LilyPad is used by some of the largest networks.

If you are willing to stretch the definition of "large networks", you would be correct. But this is a fabrication with even the most liberal definition (which would be over 3,000 players or so). All the five major minigame networks use BungeeCord, including Mineplex.

Half-truth: LilyPad uses its own network protocol to connect to backend server.

This is a a half-truth. LilyPad uses the Minecraft protocol to connect to backend servers, just like BungeeCord, and therefore incurs all the overhead of it. The only thing that is custom to LilyPad would be the LilyPad connect protocol, which maintains state.

Misconception: LilyPad allows you to keep online-mode enabled.

LilyPad only offers pseudo-online mode. Previous to this commit, LilyPad turned off online mode using reflection.

So what's the difference?

Both are functionally the same, but they follow different design patterns to achieve their goals.

BungeeCord is written in Java and has a plugin system not unlike Bukkit's. It is considered to be very highly flexible, owing to its use by large networks. However, long-running plugin code on the main Netty I/O threads can lead to issues. As an external application, BungeeCord does not easily integrate with Bukkit plugins: the primary interface to BungeeCord from Bukkit is the plugin messaging channel, which many beginning developers do not grasp well.

LilyPad is split in three parts: a central server, a proxy (all using Go), and a Bukkit plugin. It does not have a plugin system, but instead relies on the Bukkit servers to communicate with LilyPad, which considerably limits its flexibility. It has an Java API (called from Bukkit) that is simple to use. However it does not see much adoption (limiting support), requires a backend server plugin, has all the same potential security issues as BungeeCord, and potentially more.

What should I use?

My personal opinion is to use BungeeCord. It has a wider community, better support, and is actively updated.