I tried load balancing , with both default and least-conn distribution, but there is a slight degradation in overall performance of my system.
Setup is as:
React client uploads files to a node backend server which copies them to disk. File count is huge(around 15k) and some file sizes are in range of 1-2 gb. So my approach is to batch files with their cumulative size less than 250mb, and for files bigger than 250mb I upload them as chunks.
Without nginx, time taken is around 1.2 minutes. With nginx and load balancing(2 backend instances), it takes 1.3 mins on average.
Can you share the config that you are using? There are some parameters that can be tuned to help, but this also could be caused by the added hop of transferring the content through nginx. Loadbalancing in this usecase is mostly going to help with resiliency and spreading the load across multiple nodes, and not provide a increase in transfer speeds.