Avoid rust where railing anchors into concrete
Honestly, I don't think you can. The problem is railings such as this rust from the inside out. The outside gets primed and painted while the inside never gets any kind of treatment.

Aside from using solid "tubing", which is unrealistic, the only other thing I can think of is to "try" to treat the inside of the tubing in areas where water can seep up in to the tubing, such as an anchor point.