The maintenance of water heater differs substantially according to their model as tankless models have an expected lifetime of 15 to 20 yeas, where as water heaters with storage tanks are expected to live for only 5 to 15 years. The cause is that tankless models have a lot more parts that can malfunction or wear out and have to be replaced. This lengthens their lifetime significantly and makes tankless water heaters more durable.
Water heater maintenance is not only necessary if something malfunctions but according to the water condition at you home you need periodical maintenance works. First of all, the water inlet filter has to be checked and changed periodically as it can hold back the water flows. In addition, it is recommended to clean the exchanger and remove the mineral deposits build up on it. If you do not take these necessary steps from the maintenance of water heater than the lifetime of your heater can decreases considerably.
So if you want your water heater to have a long and prosperous life take care of it as water heater maintenance is not that difficult, but doing it at the right time can save you a lot of money and problems later on.