Hardware stacking is directly connecting Switches to form a larger system that behaves as a single Switch or a virtual chassis with increased port density.
Usually, the last two ports of your Switch are dedicated for Switch stacking (please check user-guide for further details).
You can manage each Switch in the stack from a master Switch using its web configuration or console.
Each Switch supports up to two stacking channels.
Use the master Switch to assign a "slot ID" for each "linecard" non-master Switch in the "virtual chassis" stack.
The main benefit of hardware stacking is to provide high availability and load balancing for servers.
For example, if we stack two XGS4600 series Switches and use link aggregation to connect the two separate Switches to a server with dual NIC, service interruption can be avoided when one of the XGS4600 switches goes offline.