They still lay sporadically until they are very old. You will see the peak production between about 2-6 years old. After that, they steadily decline over several years. Yes though, some of mine that are very old do still lay.
I hear that 6-10 years is normal for a female (they can pass away from egg laying problems) but some ducks can live 20+ I think the oldest ducks was 22 or 23. The vast majority of ducks do not die of old age, but usually are taken out by predators or health problems.