For training purposes, client mode is good enough. In a production environment, you should ALWAYS use cluster mode.
I will explain to you with an example. Imagine a scenario in which you want to run several applications. Let's say you have a 5 node cluster with nodes A, B, C, D, E.
The workload will be distributed across all 5 work nodes, and 1 node will also be used to send jobs (for example, 'A' is used for this). Now, every time you launch the application in client mode, the driver process always starts on "A".
This may work for multiple jobs, but as the number of jobs "A" increases, there will be less resources such as processor and memory.
Imagine the impact on a very large cluster that performs several of these tasks.
But if you select cluster mode, the driver will work on "A" every time, but will be distributed on all 5 nodes. Resources in this case are more evenly used.
Hope this helps you decide which mode to choose.
source share