The short version, before you go higher.
Headache, nausea, poor sleep and breathlessness at rest are the early signs. The rule is simple: do not climb higher with symptoms, and go down if they get worse. Most people feel better after losing 500 m of height.
Kunde, Pheriche and Namche have clinics; Pheriche's is run seasonally by the Himalayan Rescue Association and has oxygen and a hyperbaric chamber.
Helicopter evacuation from Lukla, Namche, Pheriche and Gorak Shep is routine in good weather. Insurance that covers high-altitude trekking is not optional.
Boiled or filtered water at every lodge. Plastic bottles are banned in the Sagarmatha National Park.