Properly planned drainage works! A little extra planning to ensure proper drop to allow for fast flow really helps in a downpour. Two main types of drains are installed. Flexible ribbed thin-wall abs and white hard shell styrene.
Flexible black drain pipe comes in 100-foot rolls and is easy to install. Fewer fittings and easy to cut.
The downside is the roots tend to enter through the loose fitting even if taped, is not water tight at connection points and is easy to crush during backfill. Is does not maintain rigidness and will bend along the bottom of the trench. Life span is 7 years near trees or shrubs.
White styrene comes in 10-foot sections, is hard so will not bend as easy making it more exact when the flow is minimal. Roots do not enter the pipe as the fittings are snug and can be glued. You can run a snake just like you can with household plumbing. I see styrene still performing on maintenance jobs over 25 years and so sign of trouble. Best long term or when near plants. Less likely to crush with equipment during backfill of the trench.
The downside is more costly in material and labor. Harder to install around corners as a little flex.