This paper focuses on certain types of distribution networks in which commodity flows must go through connections that are subject to congestion. Connections serve as transshipment and/or switching points and are modeled as M/G/1 queues. The goal is to select connections, assign flows to the connections, and size their capacities, simultaneously. The capacities are controlled by both the mean and the variability of service time at each connection. We formulate this problem as a mixed integer nonlinear optimization problem for both the fixed and variable service rate cases. For the fixed service rate case, we prove that the objective function is convex and then develop an outer approximation algorithm. For the variable service rate case, both mean and second moment of service time are decision variables. We establish that the utilization rates at the homogeneous connections are identical for an optimal solution. Based on this key finding, we develop a Lagrangian relaxation algorithm. Numerical experiments are conducted to verify the quality of the solution techniques proposed. The essential contribution of this work is the explicit modeling of connection capacity (through the mean and the variability of service time) using a queueing framework.