Derailleur or derailer
Derailers enable bicycles to use multiple gears. The word's origin is French, and it is frequently spelled derailleur in English. Before derailers, bicycles often had one gear mounted to either side of the rear hub, and riders would stop and then flip their rear wheel around to change gears. Derailleurs enabled riders to change gears while riding by "de railing" the chain from one cog to the next. By enabling multiple gears, they significantly increased the range of terrain that bicycles could cover.
Derailleurs were first invented in the late 19th century. Early derailleurs used rods to push the chain onto different cogs. Tullio Campagnolo played a major role in the development of modern derailleurs, having commercialized a successful version in 1949.
Almost all derailers are actuated by shift cables. Because cables stretch a bit over time, new bikes require a minor adjustment after a few weeks' riding. While there is a bit of a learning curve, it is possible to adjust your derailers yourself, a process outlined later. Last, the rear derailer is mounted to the frame with a derailer hangar, usually replaceable and made of aluminum. Even a minor drop can bend the hangar, which will affect shifting. However, the hangar is designed to break before anything more valuable, i.e. the derailer itself or the frame, does.
The shift cables and housing are the main wear parts in derailer drivetrains, as they will accumulate contamination over time. Very active riders may replace these as often as annually. In many cases, poor shifting can be rectified by changing the cables. The Delrin jockey wheels are the other common wear part on the rear derailer, but the replacement interval is much longer. If you can't find an OEM replacement, you should be able to find an aftermarket one.
Internally geared hubs as the main alternative
Internally geared hubs (IGHs) are an alternative system. The rear hub contains all the gears and shifting mechanisms. These are much less vulnerable to contamination than traditional drivetrains, but they have slightly greater drivetrain friction. Some IGHs may use drive belts rather than chains. Note that drive belts are not compatible with traditional derailers. IGHs are sealed from the elements, although some main require periodic lubrication through a port. This answer discusses more.
As another alternative, one can ride a single speed or fixed gear bicycle, both of which have only one or two gears (the second gear, if present, would be mounted on the opposite side of the rear hub).
The number of cogs on the rear wheel has increased with time, and the gear ranges available have become a lot wider. On road bikes, this has mostly led to the demise of the triple crankset.
Modern mountain bikes have switched to 1x (pronounced one-by) drivetrains, dropping the front derailer entirely. This has enabled wider tires and improvements in the rear suspension. 1x systems are becoming more common on gravel bikes, but they are not widespread on road bikes as of late 2021. On a 2x drivetrain, if you drop the chainring to the inside, you can often recover by shifting to the big ring and pedaling (and the reverse if you drop the chain to the outside). 1x drivetrains do not have this option. They use 1x-specific chainrings with narrow-wide teeth, i.e. the teeth alternate between narrow and wide teeth to retain the chain more firmly. They also incorporate clutches in the rear derailers, which reduce the amount of chain slap on rough terrain.
Electronically actuated drivetrains have become popular as a high-end option as well. These do away with metal shift cables entirely. They also have potential for adaptive cycling, as you can actuate shifts with a lot less finger force and you could set up the system for one-handed operation. However, they are considerably more expensive than mechanical shifting.
You can adjust your derailers yourself!
Both front and rear derailleurs are adjustable by high (H) and low (L) limit screws. The limit screws control how far the derailleur can move, so that it does not shift the chain off the large cogs into the spokes or off one of the front chainrings.
In addition, rear derailleurs have a cable tension adjuster, which accounts for the fact that cables stretch after some use. They also have a screw (the B-tension screw) which moves the derailleur angle in relation to the rear cassette. Rear derailleur operation can be compromised if the derailleur hangar, or the plate that a rear derailleur bolts to on the frame, is bent. Hangars can be replaced entirely or bent back, depending on material.
The following shows how to adjust cable-operated front and rear derailleurs and is intended for general information. Adjustment may seem intimidating at first, but it can be learned easily. NB - Before any rear derailleur adjustment, first ensure the derailleur hanger is aligned correctly
Chain Gap Adjustment (B screw)
- Shift the rear derailleur to the largest cog.
- Ideally, using a chain
gap gauge, adjust the B screw until the top derailleur jockey wheel
aligns with the teeth of the largest cassette cog. If you do not
have a chain gap alignment gauge handy, aim for the gap to be
between 10-15mm* (*refer to your groupset provider)
Rear Derailleur Adjustment
- Shift to the smallest cog on the rear cassette (this is the natural resting position for the derailleur when no cable tension is applied)
- For cable operated derailleurs, remove all tension from the rear derailleur by loosening and/or removing the cable
- Use this opportunity to wind the barrel adjuster on the rear derailleur shifter all the way in, then back it out 1 - 2 turns.
- Adjust the high limit (H) screw so that the centre of the top pulley wheel aligns with the outboard edge of the smallest cassette cog
- For cable operated derailleurs, re-attach the rear derailleur cable, pulling taught, but not under extreme pressure, and tighten the cable bolt.
- Shift to the largest cog on the rear cassette
- Adjust the low limit (L) screw so that the centre of the top pulley wheel aligns with the outboard edge of the largest cassette cog
- Fine adjustment can now be made via the barrel adjust on the shifter
Front Derailleur Adjustment
- Adjust the derailleur at its mounting bolt so that there is a clearance of 1 - 3mm between the derailleur outer plate and the largest chainring
- Tighten the clamp bolt, but do not torque to spec
- Shift to smallest cog on the rear cassette the largest chainring
- Adjust the high (H) adjustment bolt and align the front end of the derailleur outer
plate parallel to the surface of the largest chainring
- Adjust the derailleur by rotating the mount so that the rear portion of the outer plates is 0.5 - 1mm inside the outer chainring
- Tighten the derailleur clamp bolt and torque to spec
- Shift to the largest cog on the rear cassette and the smallest chainring
- Adjust the low (L) adjustment bolt so that the clearance between the skid plate of
the derailleur and the chain is 0 - 0.5mm