Maintaining the water seal is critical to trap operation; traps might dry out, and poor venting can suction or blow water out of the traps. This is usually avoided by venting the drain pipes downstream of the trap; by being vented to the atmosphere outside the building, the drain lines never operate at a pressure much higher or lower than atmospheric pressure. In the United States, plumbing codes usually provide strict limitations on how far a trap may be located from the nearest vent stack.
When a vent cannot be provided, an air admittance valve may be used instead. These devices avoid negative pressure in the drain pipe by venting room air into the drain pipe (behind the trap). A "Chicago Loop" is another alternative.
When a trap is installed on a fixture that is not routinely used—such as a floor drain—the eventual evaporation of the water in the trap must be considered. In these cases, a trap primer may be installed; these are devices that automatically recharge traps with water to maintain their water seals.