A group is essentially a Frontend and Backed combined. We generally recommend using groups, however, depending on your requirements you may need to use a frontend/backend pair.
In a nutshell,
- Frontends are in charge of accepting traffic only;
- Backends are only in charge of connecting to servers;
- Groups are a Frontend and Backend combined–they accept traffic on fixed ports, and sends traffic to a set of servers.
The reason that the option to create separate Frontends or Backends exists is to better manage the scenario in which you might want multiple Frontends performing different tasks, and sending data to one or more Backends. For example, a port 80 Frontend handling incoming requests, and a port 443 Frontend terminating SSL connections.
Let’s dig into a more detailed example.
Example: Windows Backend + Linux Backend
Let’s say you have two totally different clusters of web servers, one Internet Information Services (IIS) cluster running on Windows, and one NGINX cluster running on Linux.
In this case, it makes quite a lot of sense to have two different Backends, so you can send .aspx pages to your IIS cluster; and downloads, images, and other requests to your NGINX cluster.
So essentially, when the logic (flow, management) or the architecture (software stack, data centers) of your infrastructure requires it, you might consider having Frontends and Backends to make a better sense of management.
However, without the requirement to use Frontends and Backends as in the examples provided, you should rather stick to the simpler and cleaner option of Groups to avoid possible misconfigurations in your setup.