An electrolysis system for electrolyzing an alkali metal chloride brine, the system comprising: an electrolyzer; a main line comprising a main stream of purified brine, the electrolyzer, and a main stream of spent solution wherein the main stream of purified brine is supplied to the inlet of the electrolyzer and the main stream of spent solution is removed from the outlet of the electrolyzer; a recirculation line connected to the main line that recirculates at least a portion of the solution from the main line; and a side stream subsystem comprising: a first side stream line with an inlet and an outlet connected to the recirculation line and configured to remove a portion of the solution from the recirculation line at the inlet and return the portion to the recirculation line at the outlet; a feed for introducing alkali metal hydroxide into the first side stream line; a first feed for introducing magnesium chloride into the first side stream line; a residence tank in the first side stream line downstream of the alkali metal hydroxide and the magnesium chloride feeds (12, 11); and a filter in the first side stream line downstream of the residence tank for removing precipitated impurity species, wherein the alkali metal is preferably sodium, wherein the first magnesium chloride feed is located downstream of the alkali metal hydroxide feed in the first side stream line and characterized in that the side stream subsystem comprises: a second side stream line wherein the inlet of the second side stream line is connected to the first side stream line between the alkali metal hydroxide feed and the first magnesium chloride feed, and the outlet of the second side stream line is connected to the first side stream line between the residence tank and the filter, whereby the second side stream line bypasses the residence tank; and a second feed for introducing magnesium chloride into the second side stream line. an electrolyzer; a main line comprising a main stream of purified brine, the electrolyzer, and a main stream of spent solution wherein the main stream of purified brine is supplied to the inlet of the electrolyzer and the main stream of spent solution is removed from the outlet of the electrolyzer; a recirculation line connected to the main line that recirculates at least a portion of the solution from the main line; and a side stream subsystem comprising: a first side stream line with an inlet and an outlet connected to the recirculation line and configured to remove a portion of the solution from the recirculation line at the inlet and return the portion to the recirculation line at the outlet; a feed for introducing alkali metal hydroxide into the first side stream line; a first feed for introducing magnesium chloride into the first side stream line; a residence tank in the first side stream line downstream of the alkali metal hydroxide and the magnesium chloride feeds (12, 11); and a filter in the first side stream line downstream of the residence tank for removing precipitated impurity species, a first side stream line with an inlet and an outlet connected to the recirculation line and configured to remove a portion of the solution from the recirculation line at the inlet and return the portion to the recirculation line at the outlet; a feed for introducing alkali metal hydroxide into the first side stream line; a first feed for introducing magnesium chloride into the first side stream line; a residence tank in the first side stream line downstream of the alkali metal hydroxide and the magnesium chloride feeds (12, 11); and a filter in the first side stream line downstream of the residence tank for removing precipitated impurity species, wherein the alkali metal is preferably sodium, wherein the first magnesium chloride feed is located downstream of the alkali metal hydroxide feed in the first side stream line and characterized in that the side stream subsystem comprises: a second side stream line wherein the inlet of the second side stream line is connected to the first side stream line between the alkali metal hydroxide feed and the first magnesium chloride feed, and the outlet of the second side stream line is connected to the first side stream line between the residence tank and the filter, whereby the second side stream line bypasses the residence tank; and a second feed for introducing magnesium chloride into the second side stream line. a second side stream line wherein the inlet of the second side stream line is connected to the first side stream line between the alkali metal hydroxide feed and the first magnesium chloride feed, and the outlet of the second side stream line is connected to the first side stream line between the residence tank and the filter, whereby the second side stream line bypasses the residence tank; and a second feed for introducing magnesium chloride into the second side stream line.