When you're running a small business in a market packed to the rafters with giants, it's important to find your niche. Sometimes you have to change your business model quite drastically to stay in that niche, or to take better advantage of new opportunities along the way.

That's the case for data center operator Internap Network Services (Nasdaq: INAP) these days. The company has outgrown its toddler breeches where it needed to rely on partners who could supply crucial data center space. Now, Internap is shifting customers out of these suboptimal contracts and moving them into Internap-owned facilities wherever possible -- and the effort is showing results on the bottom line.

The controlled-churn effort to improve those contracts is hurting the top line, of course -- some customers turn to rivals such as SAVVIS (Nasdaq: SVVS) or Terremark (Nasdaq: TMRK) rather than sign a new deal with Internap. Second-quarter sales fell by 6% to $60.5 million, largely because of this dynamic. But operating margins in the data center segment have exploded from 25.1% a year ago to 36.6% this time around, turning the bottom line from a non-GAAP loss of $0.03 per share to a non-GAAP profit of $0.03 per share. Something is definitely working here.

There's still more work to be done, though. Data center services stand for only half of Internap's sales, and the network services that make up the other half is showing both lower sales and thinner margins. Granted, that division is still far more profitable than the data center segment, but nobody likes a downward trend. The root cause of this weakness is increased competition from Akamai Technologies (Nasdaq: AKAM), Limelight Networks (Nasdaq: LLNW), and others in the managed network routing market.

Internap does have a strategy to gird that Achilles' heel in bones of steel, namely by going deeper into the bare-bones content delivery niche. "We don't have as fully featured a [content delivery network as] some of the other providers," CEO Eric Cooney says. "But all of those bells and whistles aren't required for us to successfully compete in that CDN opportunity."

We haven't seen any proof of that strategy working yet, but I agree with the idea in general. Here's hoping for better traction in quarters to come, while keeping up the good work in the data center sector.

Can Internap pull off that double-dutch trick, or is the company missing some vital ingredient in a recipe for success? Share your thoughts in the comments below.

Fool contributor Anders Bylund holds no position in any of the companies discussed here. Akamai Technologies is a Motley Fool Rule Breakers recommendation. Try any of our Foolish newsletters today, free for 30 days. You can check out Anders' holdings and a concise bio if you like, and The Motley Fool is investors writing for investors.