Rural areas broadband access suffers from the limited investment of network operators, due to the forecasted return on investment. As a consequence, digital services such as eHealth, remote education, or smart agriculture cannot be offered to the rural population. In this context, research on Unmanned Aerial Vehicles (UAV) networks has emerged, which aims to solve the coverage problem by relying on small cells mounted on UAVs to provide coverage. From the network Quality of Service (QoS) point of view, i.e., the performance offered to users according to certain parameters such as delay, reliability, and throughput provisioning can be identified as one of the weak points. For the problem of maximizing throughput, the main solution is to group several UAVs in the same area. However, as the offered throughput increases, the power consumption will also increase. In this context, this paper proposes a genetic algorithm to solve the problem of jointly maximizing the offered throughput in rural scenarios where users request microservice-based IoT applications while minimizing the energy consumption of the swarm of UAVs. The algorithm is defined and evaluated in realistic scenarios, demonstrating its effectiveness on increasing the throughput while decreasing the number of UAVs that are required.