A sensor comprising a membrane for detecting failure of a membrane filtration apparatus provided upstream of the sensor, the sensor comprising: a first chamber having an inlet and an outlet; the inlet configured to be disposed in fluid communication with the upstream membrane filtration apparatus for receiving an effluent therefrom; a second chamber having an outlet; only one membrane, the membrane being disposed between the first chamber and the second chamber for allowing fluid to permeate the membrane from the first chamber to the second chamber, wherein fluid received on the membrane of the sensor is the effluent of the upstream membrane filtration apparatus; a first pressure transducer configured for obtaining a first pressure upstream of the membrane; a second pressure transducer configured for obtaining a second pressure of permeate downstream of the membrane in the second chamber; a resistance regulator disposed downstream of the second chamber and configured for adjusting the second pressure; and a control unit configured for receiving the obtained first and second pressures, and determining presence of a foulant in the effluent by determining a ratio between (P 1 - P 2) and (P 2), P 1 being the first pressure and P 2 being the second pressure, and correlating the ratio with a failure of the upstream membrane filtration apparatus, wherein correlating comprises an increase in the ratio indicating sensing of the presence of a foulant in the effluent when compared to the ratio during normal operation of the upstream membrane filtration apparatus, and wherein sensing of the presence of a foulant in the effluent is indicative of failure of the upstream membrane filtration apparatus. a first chamber having an inlet and an outlet; the inlet configured to be disposed in fluid communication with the upstream membrane filtration apparatus for receiving an effluent therefrom; a second chamber having an outlet; only one membrane, the membrane being disposed between the first chamber and the second chamber for allowing fluid to permeate the membrane from the first chamber to the second chamber, wherein fluid received on the membrane of the sensor is the effluent of the upstream membrane filtration apparatus; a first pressure transducer configured for obtaining a first pressure upstream of the membrane; a second pressure transducer configured for obtaining a second pressure of permeate downstream of the membrane in the second chamber; a resistance regulator disposed downstream of the second chamber and configured for adjusting the second pressure; and a control unit configured for receiving the obtained first and second pressures, and determining presence of a foulant in the effluent by determining a ratio between (P 1 - P 2) and (P 2), P 1 being the first pressure and P 2 being the second pressure, and correlating the ratio with a failure of the upstream membrane filtration apparatus, wherein correlating comprises an increase in the ratio indicating sensing of the presence of a foulant in the effluent when compared to the ratio during normal operation of the upstream membrane filtration apparatus, and wherein sensing of the presence of a foulant in the effluent is indicative of failure of the upstream membrane filtration apparatus.