One of the possible long-term complications of diabetes is kidney failure, when both kidneys shut down. If this occurs, you'll need dialysis (die-AL-uh-sis), to replace the functions your kidneys once performed. This includes cleaning and filtering your blood, and getting rid of excess water. Dialysis methods fall into one of two categories: Hemodialysis (HEE-moe-die-AL-uh-sis) or peritoneal (pair-ih-toe-NEE-ul) dialysis. In hemodialysis, you're connected to a dialysis machine, and your blood is routed through tubes into a device known as a dialyzer (DIE-uh-lize-er). The dialyzer acts as a filter, removing waste products and surplus liquid. After this, the blood is re-infused into your bloodstream. Hemodialysis requires about three sessions per week, each lasting two to four hours. It's available at hospitals, or you and a partner can learn to perform it at home. The other major type is peritoneal dialysis, in which the lining of your abdomen, called the peritoneal membrane, serves as the filter. In this procedure, a purifying solution is introduced into your abdomen by a tube. Small vessels in the peritoneal membrane pick up waste products from your blood, and carry them to your abdomen. After a period of time, the dirty solution is emptied, and new fluid is put back in. To find out more about dialysis, consult a doctor in your area.