A Deadly Education, by Naomi Novik
I understand that this book is the author's response to the Harry Potter world. I don't get that. There are students in a magical academy, sure, but that's as far as the comparison goes.
Rather, I see this more as an exploration of magic-at-a-cost. Magic is real in this world, but it comes with a terrible price. First, there are monsters that feed on those with magical powers. At a time, these monsters would kill more than half of magical teenagres. The solution was to build a school of magic and place it beyond the reach of the monsters. Magicians would spend their most vulnerable years there and return to the world upon graduation. Some monsters infested the school, but various automatic features were designed to keep the students safe.
Unfortunately, and this is another part of the cost of magic, the monsters discovered they could wait for the graduating class at the school gates and feed. This was due to a malfunction in the school's defenses, and there were various unsuccessful attempts to fix it. Eventually, a social solution was found. The school was initially only for the upper class, but then it was opened to all. The sons and daughters of rich and well-connected families were organized into groups, and those from less advantaged backgrounds were on their own. The only way to survive graduation was to exit as a group, so the less advantaged were forced into joining protection groups, where they essentially ended up protected their richer peers. The rich managed to survive and some of the poor managed to survive and move up in the world. Others died.
Another part of the cost is common in magic societies. Performing magic requires magical energy, and creating this energy takes a lot of work. The rich families have access to a vast store of energy, so those students can perform magic essentially at will. Poorer magicians face tough choices. It is possible to product magical energy by spending time and physical effort on tasks, like exercise. It is also possible to create energy by killing other creatures, like mice or even humans. There is a tension here.
And there is more to the cost of magic. One of the main protagonists wants to help all the students, so he takes it upon himself to kill any monsters that may roam the school grounds. Unsurprisingly, this upsets the monster ecology, so there is a price to pay even for this heroic use of magic. Magic is exensive in Novik's world!
Overall, I enjoyed this book quite a bit. I was lost at first, but once I started to understand how the world worked, I was hooked. Part of this is Novik's great work with characterization. The main characters are very interesting. Even the caricatures have surprising depth to them. I especially enjoyed the growth in the main character, El, as she learns who she is and who her mother is. This characters in this book live in a wonderful setting, but it's the characters that make the book.