When we bought two years ago our home inspector recommended that we replace the hot water heater because it is old and end of life for hot water heaters often looks like 50 gallons of water on your carpet.
That's a decent suggestion, except end of life for water heaters can easily look like many hundred gallons on the floor, because while the heater may hold 50 gallons, there's a cold water feed connected to one side that won't just stop flowing because the heater is leaking.
Part of it, for me, would depend on where the heater is and what failure looks like. If it were in a concrete basement with a drain nearby, I'd be less worried about it than if it were in a closet by the living room.
The advantage of replacing it before it fails is that you can shop around and get a good price, and the "non-emergency" labor rates.
Other than that, posting to follow as mine is nearing the end of its useful life as well. Not to hijack, but anyone have the wifi sensor enabled hot water heaters? Wondering if the extra $80 is worth the peace of mind in case there is a leak (it sends a message to your phone).
LOL. No. Save your $80. The chances that the wifi will still be working in 20 years, the cloud service it talks to will still exist, and you'll still have your phone set up to receive the message? About zero.
The chances of it becoming part of a botnet somewhere, because it's running vulnerable services for no good reason and it will never in its life ever get an update? Greater than zero.
The "Internet of Things" is a great deal - for appliance manufacturers. "Oh, sorry, your fridge is out of date - you know, we don't support that model anymore, but look at this new one that has an even bigger touch screen!"
I always assume that wherever I live, I'm going to end up replacing the WH, furnace and roof at least once. The good news is you are being proactive. Most people don't give any of this a thought until something breaks and they end up calling a service person at 2:00 am.
Yeah, but people who call the service people at 2AM are why a lot of the service guys have pretty darn new trucks! :)
========
Plan to replace the heater before it fails. For a gas appliance, I'd be inclined to pay someone to do the work, but you can do it yourself if you're comfortable with leak testing plumbing/gas connections and such.