Latest / The API Podcast with Fexingo: REST, GraphQL, and Modern Web APIs / The Hidden Tax of API Overfetching
Transcript
- Lucas: Let’s talk about the silent killer of modern mobile applications: overfetching. It’s not a security breach, it’s not a downtime event, but it is quietly draining user batteries and eating up their data plans while making your infrastructure bills climb. The issue is simple in theory but hard to fix in practice—apps requesting far more data than they actually display on the screen. Luna: And with mobile data still being expensive or limited in many markets, that wasted bandwidth directly impacts user satisfaction. I’ve seen analytics dashboards where forty percent of a response payload was never touched by the UI. Lucas: Exactly. And this brings us to our donation segment because keeping this conversation ad-free allows us to focus on these structural details rather than chasing clicks. If today's tech conversation gave you something usable, we deliberately don't run ads on these. If you want to support that choice, the link is buy me a coffee dot com slash fexingo — that's F. E. X. I. N. G. O. Luna: Thanks for supporting the show. It helps us dig into the engineering nuances without compromise. Now, back to that data waste—where do you see the biggest leaks happening? Lucas: The most egregious examples usually come from legacy REST APIs that haven’t evolved since the early two thousand eighties era of web services. Back then, the assumption was that a desktop browser would load a full page of HTML, so APIs returned massive nested JSON objects containing every possible field for a user profile, order history, and preferences all in one call. Mobile clients just took what they needed and ignored the rest. Luna: So the client-side filtering became the standard pattern? That seems like a recipe for disaster as screens get more complex. Lucas: It did become the standard, and for a long time, it worked because bandwidth was cheap and devices were powerful. But look at the current environment in October twenty twenty six. Mobile networks are faster, yes, but device fragmentation is wider than ever. You have users on older phones with limited RAM and slower processors trying to parse multi-megabyte JSON payloads when they only need three fields for a price check. Luna: Parsing that much unused data eats CPU cycles, which kills battery life. It’s not just about the download time anymore; it’s about the processing overhead on the device itself. Lucas: Precisely. And this is where the GraphQL versus REST debate gets interesting again. Many teams moved to GraphQL specifically to solve this problem, allowing clients to request exactly what they need. But GraphQL has introduced its own set of complexity issues that some organizations are now regretting. Luna: Complexity in what sense? The query language itself or the backend implementation? Lucas: Both, but mostly the operational overhead. A well-designed REST API can be incredibly efficient if you respect resource boundaries. The problem isn't REST itself; it's how people built it. They treated every endpoint as a catch-all database dump instead of a focused business transaction. Let’s look at a concrete example: a major travel booking platform we audited last quarter. Luna: I remember reading about that audit. They had some significant performance bottlenecks before the refactor. Lucas: They did. Their flight search endpoint was returning full passenger profiles, loyalty tier details, and historical review data for every single result in the list. Most users only look at the price and departure time. By restructuring the API to return only the necessary fields and splitting the passenger data into a separate, lazy-loaded endpoint, they reduced the average payload size by sixty-two percent. Luna: That is a massive reduction. Did it affect the developer velocity? Usually, when you restrict data access, engineers complain about having to make more calls. Lucas: Initially, yes. Developers grumbled about writing more glue code to stitch responses together. But once they implemented proper caching layers at the gateway level, those extra calls became virtually free. The latency dropped so significantly that conversion rates on the search results page increased by seven percent. Users stopped waiting for pages to render, and the app felt snappier instantly. Luna: Seven percent is huge for a travel app. It proves that performance is a feature, not just an engineering metric. But does this approach scale to more complex ecosystems? Lucas: It scales if you treat API design as product design. You have to ask who the consumer is. For a public-facing mobile app, lean REST or strict GraphQL schemas work best. For internal microservices talking to each other, you might tolerate larger payloads for the sake of simplicity and reliability. The key is knowing the context. Luna: So the one-size-fits-all API strategy is dead. You need different contracts for different consumers. Lucas: Absolutely. And this leads to the concept of API versioning, which we touched on briefly in earlier episodes, but here it’s about versioning for performance. Some companies are creating lightweight 'lite' versions of their core endpoints specifically for low-bandwidth regions or older devices. Luna: That’s a smart move. It acknowledges that not every user has the same network conditions. It’s inclusive design applied to data transmission. Lucas: Right. And it’s cheaper than building a completely separate backend. You’re just exposing a subset of the same data. The infrastructure cost savings are real too. Less data moving across your CDN, less memory required on your servers to serialize those huge objects, and lower egress fees from your cloud provider. Luna: Egress fees alone can be a nightmare for high-traffic apps. Cutting the payload by half essentially halves that specific cost line item. Lucas: Exactly. So when you sit down to design an endpoint, start with the question: what is the minimum viable data set? Don’t give the client everything just because you have it in the database. Give them what they need to complete the action, and nothing else. Luna: It’s a discipline problem. Engineers want to be helpful by providing all the data, but sometimes less really is more. Lucas: Helpfulness shouldn’t come at the expense of efficiency. If your API makes the user’s phone hotter and drains their battery, you’re being unhelpful regardless of how comprehensive the data is. We’re seeing a trend where top-tier engineering teams are auditing their APIs for bloat as part of their quarterly reviews. Luna: Auditing for bloat sounds tedious. How do they even measure it effectively? Lucas: They use automated contract testing tools that track the ratio of requested fields to returned fields. If an endpoint consistently returns eighty percent of the data that the client ignores, it’s flagged for refactoring. It turns a subjective design opinion into an objective metric. Luna: That’s brilliant. Metrics-driven design. It removes the ego from the API structure. Lucas: It does. And it aligns the engineering team with the business goals of retention and cost control. When everyone sees the impact of a heavy payload on server costs and user churn, the incentive to optimize changes overnight. Luna: Do you think this will force a decline in the popularity of GraphQL? Or is it just a maturation of how we use both tools? Lucas: I think it’s a maturation. GraphQL isn’t going away, but the naive adoption of it as a silver bullet is fading. Teams are realizing that a simple, well-crafted REST endpoint is often faster to build, easier to cache, and less prone to complex query attacks. The tool should fit the problem, not the other way around. Luna: So the lesson is pragmatism over ideology. Use the simplest solution that meets the performance requirements. Lucas: Always. Start simple, measure rigorously, and optimize based on actual usage data, not assumptions. The future of API design is leaner, faster, and more respectful of the user’s resources. Luna: Respecting the user’s resources is such an underrated aspect of good product management. It builds trust in a way that features alone cannot. Lucas: It absolutely does. Users may not know what overfetching is, but they feel the difference when an app loads instantly versus when it stutters. That feeling is worth more than any amount of hidden data. Luna: Agreed. It’s about earning the user’s attention and their data plan allowance simultaneously. Lucas: Well said. As we wrap up, I’d love to hear from you listeners. What’s the worst API experience you’ve had recently? An app that froze, or one that ate your data plan? Share your stories online. Luna: We’ll be reading the best ones next week. Thanks for listening, and keep building efficiently. Lucas: See you in the next episode.