Welcome!

Related Topics: @DevOpsSummit, Linux Containers, Containers Expo Blog, @ThingsExpo

@DevOpsSummit: Blog Feed Post

APIs Are Not Web Pages | @DevOpsSummit #API #IoT #M2M #DNS #DevOps

Even though web pages might be built from APIs, they are not the same

There’s a tendency, particularly for networkers, to classify applications by the protocols they use. If it uses HTTP, it must be a web app. The thing is that HTTP has become what it was intended to be: a transport protocol. It is not an application protocol, in the sense that it defines application messages and states. It merely transports data in a very specific way.

That’s particularly important in the age of the API and, increasingly, the age of things that might be using APIs. You see, APIs are primarily data centric constructs while web pages (think any HTML-based app) are document centric constructs.

Data centric constructs tend to exchange, well, data. And document centric constructs… yes, exchange documents. Both might use HTTP as a mechanism to do that, but the actual payload carried differs dramatically. That’s because data centric constructs are concerned with exchanging data that is not necessarily meant for human consumption. It’s meant to provide the application with information that it can then process and display or act on accordingly. Document centric constructs, on the other hand, are meant to be consumed by human beings. Because of that they tend to include all the stuffs required to format, display, and present information.

Now, some web apps are a combination of both. There’s a framework composed of HTML that lays out the user interface, and then scripting that exchanges and processes data via APIs. The initial “load” grabs the document, subsequent interactions exchange data.

The reason I’m being so pedantic about this difference (ignoring that pedantry is my superpower) is because this distinction is critical when architecting for scale. The load generated by these interactions is different. Loading a single page is no trivial task these days. HTTP Archive, which tracks these fascinating kinds of numbers, notes that the average page required 35 TCP connections to load.

35 TCP connections.

That may be because the average document size was 24kB, comprising 889 elements.

So not only do we need to open a lot of connections, we’re taking a lot of time transferring data over those connections.

Now it is true that APIs also get objects. The thing is that except for images, almost all data is a far more compact form and it is data, not visual elements of a document or UI. For APIs, JSON is universally favored right now, and it adheres to a fairly consistent key:value paradigm, with appropriate embedded lists (arrays) of objects within it. Pagination and a smaller screen size dictate generally smaller pieces of data at a time, displayed in preparation for user interaction. The interface already exists, the data is simply used to populate that interface. This is not the same as HTML, where both interface and data presentation often need to occur as the result of transferring the objects.

Dependencies, too, are different. Many of the optimization techniques used by ADCs and front-end optimization services focus on the web of interdependencies that exist naturally in an HTML document. You can’t layout the page until you’ve loaded the style sheet that dictates it (CSS), and scripts may need to execute before data is processed for display (or as part of that process), and so on. The display of one object might depend on the existence of another that is not yet loaded. Hence the focus on optimizing the transfer of objects in an order that allows the UI to begin parsing and presenting information as soon as possible, giving the illusion, at least, of greater speed whether or not reality matches the illusion.

In other words, the API returns a single, large chunk of data. It may or may not trigger additional calls to retrieve additional objects. A web page, by design, automatically will.

So… to sum up this comparison, APIs exchanging JSON are not the same as HTML even though both are using HTTP as the transport layer.

What does that mean?
It means, kids, that optimizing an API is not the same as optimizing a web page. It means that techniques like minification (stripping out white space and comments) isn’t necessarily going to improve performance of APIs, nor will reordering objects or inlining scripts and style sheet elements. It means that optimization an API depends a whole lot on design (which networkers can’t do that much about) and on the intermediaries you use to scale and secure that API.

A significant number of APIs are geared toward mobile devices. Mobile devices are infamously plagued by poor performance largely due to excessive round trip times (RTT) from DNS and the overhead of connection establishment. APIs delivered via HTTP can stand to be connected with longer TCP idle times to prevent requiring re-establishment of the underlying TCP session during the application experience. To offset the impact on capacity that has (servers can only serve so many concurrent connections, after all), using an intermediary (a full proxy) that effectively splits the interaction between “client” side and “server” side can reduce the impact of longer-lived sessions while simultaneously improving performance by eliminating the extra round trips required to establish a TCP session by employing TCP multiplexing techniques (similar to HTTP/2).

Compression, too, if your API is returning significantly large chunks of data, can be a bonus. Many API optimizing blogs and articles point out that for some reason, compression is rarely “on” at the server. There are reasons for this, good reasons, but that doesn’t mean compression shouldn’t be used at all. When appropriate, let the intermediary (proxy) apply compression, as it is usually far enough upstream to avoid the potential negative impact of doing so.

The big deal here is that optimizing an API for performance is not necessarily the same as optimizing a web application, even though both use HTTP. So if you’re really looking for a performance boost for APIs and you can’t get developers to change what they’re doing, look to the network and, as is increasingly the case today, to the architecture.

Read the original blog entry...

More Stories By Lori MacVittie

Lori MacVittie is responsible for education and evangelism of application services available across F5’s entire product suite. Her role includes authorship of technical materials and participation in a number of community-based forums and industry standards organizations, among other efforts. MacVittie has extensive programming experience as an application architect, as well as network and systems development and administration expertise. Prior to joining F5, MacVittie was an award-winning Senior Technology Editor at Network Computing Magazine, where she conducted product research and evaluation focused on integration with application and network architectures, and authored articles on a variety of topics aimed at IT professionals. Her most recent area of focus included SOA-related products and architectures. She holds a B.S. in Information and Computing Science from the University of Wisconsin at Green Bay, and an M.S. in Computer Science from Nova Southeastern University.

Latest Stories
While some developers care passionately about how data centers and clouds are architected, for most, it is only the end result that matters. To the majority of companies, technology exists to solve a business problem, and only delivers value when it is solving that problem. 2017 brings the mainstream adoption of containers for production workloads. In his session at 21st Cloud Expo, Ben McCormack, VP of Operations at Evernote, will discuss how data centers of the future will be managed, how th...
There is huge complexity in implementing a successful digital business that requires efficient on-premise and cloud back-end infrastructure, IT and Internet of Things (IoT) data, analytics, Machine Learning, Artificial Intelligence (AI) and Digital Applications. In the data center alone, there are physical and virtual infrastructures, multiple operating systems, multiple applications and new and emerging business and technological paradigms such as cloud computing and XaaS. And then there are pe...
Why Federal cloud? What is in Federal Clouds and integrations? This session will identify the process and the FedRAMP initiative. But is it sufficient? What is the remedy for keeping abreast of cutting-edge technology? In his session at 21st Cloud Expo, Rasananda Behera will examine the proposed solutions: Private or public or hybrid cloud Responsible governing bodies How can we accomplish?
SYS-CON Events announced today that MIRAI Inc. will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. MIRAI Inc. are IT consultants from the public sector whose mission is to solve social issues by technology and innovation and to create a meaningful future for people.
SYS-CON Events announced today that Keisoku Research Consultant Co. will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Keisoku Research Consultant, Co. offers research and consulting in a wide range of civil engineering-related fields from information construction to preservation of cultural properties. For more information, vi...
Today most companies are adopting or evaluating container technology - Docker in particular - to speed up application deployment, drive down cost, ease management and make application delivery more flexible overall. As with most new architectures, this dream takes significant work to become a reality. Even when you do get your application componentized enough and packaged properly, there are still challenges for DevOps teams to making the shift to continuous delivery and achieving that reducti...
SYS-CON Events announced today that Massive Networks, that helps your business operate seamlessly with fast, reliable, and secure internet and network solutions, has been named "Exhibitor" of SYS-CON's 21st International Cloud Expo ®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. As a premier telecommunications provider, Massive Networks is headquartered out of Louisville, Colorado. With years of experience under their belt, their team of...
Most of the time there is a lot of work involved to move to the cloud, and most of that isn't really related to AWS or Azure or Google Cloud. Before we talk about public cloud vendors and DevOps tools, there are usually several technical and non-technical challenges that are connected to it and that every company needs to solve to move to the cloud. In his session at 21st Cloud Expo, Stefano Bellasio, CEO and founder of Cloud Academy Inc., will discuss what the tools, disciplines, and cultural...
SYS-CON Events announced today that Enroute Lab will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Enroute Lab is an industrial design, research and development company of unmanned robotic vehicle system. For more information, please visit http://elab.co.jp/.
SYS-CON Events announced today that Cedexis will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Cedexis is the leader in data-driven enterprise global traffic management. Whether optimizing traffic through datacenters, clouds, CDNs, or any combination, Cedexis solutions drive quality and cost-effectiveness.
SYS-CON Events announced today that Ryobi Systems will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Ryobi Systems Co., Ltd., as an information service company, specialized in business support for local governments and medical industry. We are challenging to achive the precision farming with AI. For more information, visit http:...
Today traditional IT approaches leverage well-architected compute/networking domains to control what applications can access what data, and how. DevOps includes rapid application development/deployment leveraging concepts like containerization, third-party sourced applications and databases. Such applications need access to production data for its test and iteration cycles. Data Security? That sounds like a roadblock to DevOps vs. protecting the crown jewels to those in IT.
What is the best strategy for selecting the right offshore company for your business? In his session at 21st Cloud Expo, Alan Winters, U.S. Head of Business Development at MobiDev, will discuss the things to look for - positive and negative - in evaluating your options. He will also discuss how to maximize productivity with your offshore developers. Before you start your search, clearly understand your business needs and how that impacts software choices.
21st International Cloud Expo, taking place October 31 - November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA, will feature technical sessions from a rock star conference faculty and the leading industry players in the world. Cloud computing is now being embraced by a majority of enterprises of all sizes. Yesterday's debate about public vs. private has transformed into the reality of hybrid cloud: a recent survey shows that 74% of enterprises have a hybrid cloud strategy. Me...
Real IoT production deployments running at scale are collecting sensor data from hundreds / thousands / millions of devices. The goal is to take business-critical actions on the real-time data and find insights from stored datasets. In his session at @ThingsExpo, John Walicki, Watson IoT Developer Advocate at IBM Cloud, will provide a fast-paced developer journey that follows the IoT sensor data from generation, to edge gateway, to edge analytics, to encryption, to the IBM Bluemix cloud, to Wa...