Segment routing is an emerging traffic engineering technique relying on MPLS label stacking to steer traffic using the source routing paradigm. Traffic flows are enforced through a given path by applying a specifically designed stack of labels (i.e., the segment list). Each packet is then forwarded along the shortest path toward the network element represented by the top label. Unlike traditional MPLS networks, segment routing maintains per-flow state only at the ingress node, no signaling protocol is required to establish new flows neither to change the routing of active flows. Thus, control plane scalability is greatly improved. Several segment routing use cases have been recently proposed. As an example, it can be effectively used to dynamically steer traffic flows on paths characterized by low latency values. However, it may also suffer from some potential issues. Indeed, deployed MPLS equipment typically supports a limited number of stacked labels. Therefore, it is important to define the proper procedures to minimize the required segment list depth. This work is focused on two relevant segment routing use cases: dynamic traffic recovery and traffic engineering in multi-domain networks. Indeed, in both use cases, the utilization of segment routing can significantly simplify the network operation with respect to traditional IP/MPLS procedures. Original schemes are proposed in this paper and evaluated including a simulative analysis of the depth of the required segment lists. Moreover, an experimental demonstration is performed in a multi-layer testbed exploiting an SDN-based implementation of segment routing.