TL;DR: Don't write to multiple Galera nodes, you get deadlocks on COMMIT
and it's not what Galera was designed for. MaxScale helps you abstract the cluster into a single database endpoint that your applications can use without having to think about load balancing.
Is it beneficial to write to multiple Galera nodes?
Writing to multiple Galera nodes gives you no performance benefits over writing to a single node: all the nodes end up performing roughly the same IO as they apply the transactions replicated via WSREP to the database itself.
Writing to multiple nodes also comes with the risk of conflicting transactions during COMMIT
. From my experience applications are rarely written to handle this gracefully which means you'll risk increasing your error rate at no benefit to write throughput if you do your load balancing in a round-robin manner.
Why should I use a database proxy?
The reason why you'd want to use something like MaxScale with readwritesplit in front of your Galera cluster is to delegate the load-balance of reads to MaxScale while still being able to interact with only a single "database" server. Using MaxScale gives you improved read throughput without a risk for deadlocks on commit while still keeping the HA guarantees given by Galera: if a node in the cluster fails, MaxScale will detect it and redirect writes to a different node.
Which router to use?
As for performance, the optimal approach for mixed workloads is to use the readwritesplit router. This makes it so that you can just point your application at MaxScale without having to worry about which node you're doing your writes on. If you know your application only does reads and never modifies the database, you can use the simpler readconnroute router to do simple connection-based load balancing while still getting some of the benefits of having a dedicated database proxy like MaxScale (active monitoring, single entry point, a convenient GUI, pre-validation of users etc.).
The end result of all of this is that you can use a cluster of database nodes with MaxScale in front of them without having to change your application at all.
Disclosure: I'm a part of the MariaDB MaxScale development team.