Cloud computing is dominating Internet services and would continue to expand in the foreseeable future. It is very challenging for network operators to evolve their infrastructures to be more intelligent and agile in resource orchestration. Nowadays, the optical networks term denotes high-capacity telecommunications networks based on optical technologies and components that can provide capacity, provisioning, routing, grooming, or restoration at the wavelength level. The proposed Elastic Optical Networks (EONs) technology is expected to mitigate this problem by adaptively allocating spectral resources according to client traffic demands. In this paper, we focus on survivability problems in dynamic routing in EONs. We propose Adaptive Survivability (AS) approach to achieve the best trade-off between the efficiency of path protection and cost of routing. Moreover, we propose entirely new Routing, Spectrum and Modulation Assignment (RMSA) algorithm to optimize both anycast and unicast traffic flows. Finally, we evaluate the performance of RMSA algorithms and assess the effectiveness of AS approach under various network scenarios. The main conclusion is that using AS approach results in significant improvement of network performance.