We present a framework for designing end-to-end congestion control schemes in a network where each user may have a different utility function. We first show that there exists an additive increasemultiplicative decrease scheme using only end-to-end measurable losses such that a socially-optimal solution can be reached. We incorporate noncongestion -related random losses and round-trip delay in this model, and show that one can generalize observations regarding TCP-type congestion avoidance to more general window flow control schemes. We then consider explicit congestion notification (ECN) as an alternate mechanism (instead of losses) for signaling congestion and show that ECN marking levels can be designed to nearly eliminate losses in the network by choosing the marking level independently for each node in the network. While the ECN marking level at each node may depend on the number of flows through the node, the appropriate marking level can be estimated using only aggregate flow mea..