Getting a flu shot is a seasonal rite. But why do you need one every year — and why doesn't it always work? Here's everything you need to know:

How does the vaccine work?
The flu vaccine contains inactive or weakened versions of three or four different strains of the influenza virus. Most people receive the vaccine via injection, but there is also a nasal spray available. The weakened viruses can't cause serious illness, but they trigger and train the immune system to fight off the invading microorganisms. White blood cells generate an army of antibodies, which attack and destroy the vaccine viruses by attaching themselves to parts of the virus known as antigens. The vaccine antigens have the same shape as real flu antigens, so the immune system now has antibodies that match up with the real flu virus. That experience teaches the immune system to recognize future flu infections and quickly make antibodies to attack the invading viruses. It takes about two weeks after receiving the vaccine to develop immunity, which is why doctors recommend getting it early in the flu season, which begins in October and can last as late as May.

Do most people get vaccinated?
No. Although the U.S. has one of the highest vaccination rates in the world, only 45 percent of adults and 63 percent of children get flu shots each year. Scientists estimate that if the vaccination rates were boosted to between 80 and 90 percent, it could effectively stop seasonal flu from spreading because of herd immunity. Influenza is one of the world's most contagious diseases, spreading easily through the air and by touch. It affects between 5 and 15 percent of the world's population every year. The disease kills 12,000 Americans during mild flu seasons and up to 56,000 in severe ones, with 90 percent of the victims over 65 years old. Many people don't get vaccinated, however, either because they fear getting the shot or believe it isn't effective.

How effective is it?
The vaccine's effectiveness varies dramatically depending on how well it matches the viruses circulating in a given season. In good years, the vaccine protects 50 to 70 percent of the people receiving it. But some strains are more difficult to create vaccines for, such as the H3N2 type, which raged during the severe 2017 flu season. That year's vaccine was found to be only 40 percent effective overall. Nevertheless, doctors recommend getting the shot anyway because even some immunity helps slow the spread of the disease. Vaccination also can make symptoms of any flu infection less severe, even if it doesn't completely prevent illness. "We do have something that works," says Peter Palese, a virologist at the Icahn School of Medicine at Mount Sinai in New York. "It's not perfect, but it's better than not having any vaccination."

What makes flu so tricky?
The flu virus is constantly mutating, rendering the body's antibodies against previous flu infections obsolete. Influenza is less stable than other viruses, such as chicken pox, because its main genetic material is RNA. The virus makes many small errors when it copies its genetic code during reproduction. Every generation of the flu virus has a slightly different genetic structure, which is harder for the immune system's existing antibodies to recognize. This process is known as "antigenic drift." Scientists have to guess which influenza strains will be more prevalent well before flu season starts, to give pharmaceutical companies time to manufacture enough of the vaccine.

How are vaccines made?
The process hasn't changed much since the first flu vaccines were given to American soldiers in 1945. Over 90 percent of flu vaccines are incubated in fertilized chicken eggs, because the virus grows extremely well in them. This technique is relatively cheap, but production is cumbersome and time-consuming, taking about six months. The World Health Organization issues predictions for the Northern Hemisphere flu season in February based on observational data and laboratory studies, with pharmaceutical companies beginning production almost immediately. The process requires about 900,000 chicken eggs per day. Given the six-month time lag, it's all but impossible to swiftly order up vast new batches of vaccine in case an unexpected strain emerges, which is what happened in the 2009-10 flu season with the H1N1 virus, better known as swine flu. The virus infected an estimated 61 million people in the U.S., killing 12,000.

Are improvements possible?
In theory, yes. President Trump issued an executive order in September directing the Department of Health and Human Services to create a flu vaccine task force to modernize seasonal vaccine production. However, the order does not provide any additional funding for vaccine development. Experts say it could take decades to develop the sophisticated new infrastructure needed to make vaccines in animal cells instead of eggs. "Egg production is a huge bottleneck," says Martin Friede, coordinator of the Initiative for Vaccine Research at the World Health Organization. "You can't just call your local egg farm and say tomorrow I need 10 million more eggs."

A universal flu vaccine
The holy grail of flu research is a universal vaccine that would provide lasting protection against all forms of the virus, but it remains elusive. There have been clinical trials in the past, with the National Institutes of Health beginning a new round of tests on humans this year. The hope is to train the immune system by targeting the stem of a protein on the virus, which varies little from strain to strain. However, our bodies don't generate many antibodies to target this part of the virus, instead focusing on the frequently changing head. Because of a process called "imprinting" — in which the immune system learns how to fight viruses based on the first encounter — it's difficult to teach the body new habits. "I don't think we're that close at all," says Michael Osterholm, director of the University of Minnesota's Center for Infectious Disease Research and Policy. "I think the kind of work that's gone on has been critical and important, but it's only the first 5 feet of what would need to be a 100-foot rope."