What makes a good marriage — in fact and fiction? Kimberly McCreight takes a gimlet-eyed attempt at answering that question in the irresistible domestic drama “A Good Marriage.” McCreight made her name with her 2013 novel “Reconstructing Amelia” in which a mother seeks answers about her daughter’s death at an exclusive Park Slope, Brooklyn school. In “The Good Marriage” she zeros in on another suspicious death in the same neighborhood, where, apparently, entitlement and narcissism are running amok among the couples who live there.

The plot centers on the investigation into the murder of Amanda Grayson, who is found dead at the bottom of her newly renovated home’s staircase. She was last seen attending an annual summer party during which couples swap partners in the upstairs bedrooms of a gorgeous brownstone. The novel, which is filled with titillating details — there are sex parties, blackmail and pornography — has been optioned for a TV series by Nicole Kidman, who was perhaps drawn to its similarities to “Big Little Lies.”

When “A Good Marriage” opens, Lizzie Kitsakis is working late in her office at a high-end law firm when the phone rings. On the line is Zach Grayson, a friend from law school she has not heard from in more than a decade. Zach is being held at the Rikers Island prison complex, charged with assaulting a police officer, but it’s only a matter of time before he will be charged with murdering Amanda.

Zach claims he is innocent and presses the reluctant Lizzie into representing him. McCreight keeps the enigmatic Zach in police custody for the entirety of the novel. This allows her ample opportunity to focus on other characters and their possible motives for killing Amanda.

The equally compelling parallel plot involves a data breach at the pricey Brooklyn Country Day School the children of some of the potential suspects attend. Personal information is stolen, and soon a handful of families are being blackmailed. The families’ tawdry secrets — peeper pornography on a home computer and a husband’s predilection for a dating site for married people — make for an interesting contrast to the public images these families present. But it is the “Sleepaway Soiree” sex party that makes for some of the novel’s most entertaining reading.

So, who are our suspects? There is Zach, who left the party early; party host Maude whose husband, Sebe, was seen following Amanda upstairs; Sarah, who works for Zach and Amanda’s foundation, and her husband, Kerry, who recently lost his job. There’s Sam, Lizzie’s husband, a blackout drunk who cannot account for his whereabouts. Another suspect is Amanda’s abusive father.

The real mystery, though, is not the identity of the killer, but the answer to that age old question about solid marriages. The wives and husbands toss around enough cliches to fill a king-size marital bed. “Low expectations” and “Absence makes the heart grow fonder” are just two. Sarah, maybe, tosses off the truest of all: “A good marriage is the one that survives. And none of us will know that until all is said and done.” The same goes for the identity of Amanda’s killer. You will never see it coming.

Carol Memmott is a writer in Austin.

A GOOD MARRIAGE

By Kimberly McCreight

Harper, 387 pages. $27.99