It used to be standard practice for water heaters to use a 3″ vent connector, but today all that’s allowed is a 4″ vent connector or larger. For residential installations, it’s very unusual to have anything other than a 4″ vent connector.
As for vent connector length, this is a tough one to figure out. In general, the shorter the better. The longer the run on a vent connector, the greater the potential for backdrafting. The image above would depict a more ideal installation if the water heater were installed closer to the vent, but still, it’s not bad.
National fuel gas codes allow the vent connector to have 1-1/2′ of horizontal run for every inch of vent connector diameter. In other words, a 4-inch vent connector would be allowed to have a 6-foot horizontal run. There are exceptions that allow for longer runs, but this is a good guideline to follow.
When a water heater vent connector is over six feet long, it’s probably an improper installation that might not draft properly. Sometimes it’ll still work just fine, however, and that’s why testing for proper draft and looking for signs of previous backdrafting is important.