A CDI performs ‘capacitive deionization’ which removes ions from water. The CDI treats water by passing it past or through electrodes that have an electrical potential difference. Thereby anions and cations adhere to the oppositely charged electrodes. Ions accumulate on the electrodes during the adsorption cycle to produce a desalinized water outlet stream. During the desorption cycle the adhered ions are released from the electrodes and discarded in a concentrated waste stream.