If you're thinking of going keto, you can forget the bread, beans, bananas, and nearly every other sweet treat.

The ketogenic diet is an exacting, tough-to-follow formula for rapid weight loss. The regimen essentially tricks your body into thinking it's starving by depriving it of nearly all carbohydrates.

The goal is to trigger a metabolic state called ketosis, in which the body burns fat for energy instead of storing it up in reserve.

Typically, people on the keto diet rely on fat for 70% to 80% of their caloric needs.

They consume no more than 20 to 50 grams of carbohydrates a day, which means they're limited to about an apple's worth of sugars and starches, if that.

Avoiding carbs is essential for maintaining ketosis; if you mess up the ratio, you'll quickly kick yourself out of the fat-burning state, and your body will start burning carbohydrates again, and storing more of the fat you eat as reserves.

The diet has gained popularity from Hollywood to Silicon Valley, with celebrities and venture capitalists alike marveling at how going keto controls their appetite, seems to sharpen mental focus, and trims waistlines.

But keto has its critics. Some doctors say they're seeing more patients dealing with painful kidney stones, and they worry that some dieters may not drink enough water or are consuming too much protein, which acidifies urine.

Still, even nutritionists who are cautious about extreme low-carb diets are starting to agree that going keto can be part of a winning formula for managing type 2 diabetes and controlling epileptic seizures.

New evidence also suggests that the high-fat plan may improve certain cancer treatments and could help keep our brains healthy, though more research on those topics is needed.

We've rounded up some of the clearest advice on keto from a skeptical Harvard cardiologist, a keto evangelist who's been on the diet for six years, and a physician from the Cleveland Clinic.

Here's what to know if you're considering this high-fat regimen.

The keto diet is not for everyone

Many people should never consider going on a ketogenic diet.

David Harper, a cancer researcher and physiology professor, has been on the plan for six years. But he tells anyone who wants to try it to talk to a doctor first.

"Should we put everybody on a ketogenic diet? I don't think so," Harper said. "Because about a quarter of the people probably don't need it."

People who should be especially cautious about keto include those with a history of kidney or liver issues, as well as pregnant women.

Others that should never follow the eating regimen have rare disorders that make it difficult to metabolize ketones, which are the chemicals your liver makes when it burns fat for fuel.

People's magnesium levels can also plummet on the keto diet, and the plan can mess up the diverse garden of gut microbes that help us stay healthy if dieters aren't careful.

So if you do go keto, make sure to get enough fibre from leafy greens and low-starch veggies to keep things running smoothly. And drink lots of water.

"You can't do this halfway – you have to be all in," Harper said.

For him, that means sticking to limited quantities of meat, making most of his meals at home, and enjoying plenty of butter and cheese.

Some doctors – even those who might may prescribe the diet to some of their patients – acknowledge it isn't the right plan for everyone, including them.

"If I eat no carbs, I will lose too much weight, and it won't be good for me," Cleveland Clinic doctor Mark Hyman said during a recent question and answer session.

"I need a little bit; that's my metabolism."

But Hyman said many of his patients thrive on the plan.

5bcf2f1ac63f4e70a3470bdb 1200(Flickr)

Ketosis can act like a miracle drug for certain conditions

The most surefire benefits of the keto diet have to do with reducing epileptic seizures, inflammation, and "hyper-excitability" of nerve cells, as Harper put it.

Children with tough-to-control seizures can see great improvements by going on a keto regimen for several months to two or three years. After that, they may go back to a more traditional diet and still see fewer seizures thanks to their keto stint.

"It's changing something fundamental at the cellular level, which is pretty cool," Harper said.

The diet can also help people with obesity in a similar way, serving as a reset button for those who are severely overweight.

"If you're 300 pounds, if you're diabetic, it can be very effective to get your systems unstuck from the metabolic crises it's in, and put it in healthier state," Hyman said.

He added, "There's great evidence that you can reverse up to 60% of type 2 diabetes in a year."

You don't have to stay keto for life, but waffling back and forth isn't good for your health

Other doctors maintain a cautious approach to extreme diets like keto, largely because they're so hard to maintain.

One 2017 study published in the New England Journal of Medicine suggested yo-yo dieting has deadly consequences, and it can lead to serious health problems, including more deaths, heart attacks, and strokes.

Sara Seidelmann, a cardiologist and nutrition researcher at Harvard Medical School, recently coauthored a somewhat controversial roundup of studies examining people's diet patterns and death rates around the world.

She found that people who ate a moderate amount of carbohydrates, especially those who consumed more whole grains and vegetables, tended to live the longest.

People who stuck to low-carb diets (which are often meat-heavy) or high-carb diets (those who consume little more than white rice) had shorter average lifespans.

Her big takeaway was that the quality of a diet mattered much more than how many carbs people ate.

"Try to make choices that fill your plate with plants," she said.

That includes "whole foods and whole grains, things that you can recognise," she added.

But Seidelmann also recognises that a keto stint can be a successful weight-loss strategy as long as people don't eat too much low-quality processed food or red meat.

Once the desired goal is achieved, though, she believes healthy, plant-based carbohydrates like whole grains and beans should be incorporated into meals again.

"Once that phase of dieting is over, it may be really worth taking a long pause and thinking about, what are the healthy choices that you can make for your whole life?" she said.

All three experts agree it's more important to stick to a diet that's healthy, rather than one that will cause energy crashes.

"The first thing you want to do, and I think we're all agreeing now, is get sugar out of your diet," Harper said.

He also doesn't endorse shifting back and forth between high- and low-carb plans. In fact, he thinks it's dangerous and puts unneeded stress on the body.

"There's a metabolic conversion that happens each time you do that," he said.

"When you start adding high-carb calories on to that again, it's already biasing your body to store fat, because it thinks you've been in a fasting state."

Whether you decide keto's a good plan for you, experts maintain any healthy plan should include plenty of fresh produce, limited doses of meat, and whatever fat-to-carb ratio you can maintain in good health.

This article was originally published by Business Insider.

More from Business Insider: