There is a concept of ISSU upgrade on XR that can help minimize the downtime.
http://www.cisco.com/c/en/us/td/docs/routers/asr9000/software/asr9k_r4-3/system_management/configuration/guide/b_sysman_cg43asr9k/b_sysman_cg43asr9k_chapter_0100.html#concept_1D1745F2952647BF9FCF72270CECFF09
Hope this helps,
Regards
Vinit
Thanks
--Vinit