You're viewing Apigee
and Apigee hybrid
documentation.
View Apigee Edge
documentation.
This section is about common antipatterns that arise when API proxies are deployed on Apigee.
What is an antipattern?
An antipattern is a software design practice that is ineffective or counterproductive—in other words, the opposite of a "best practice." To put it another way, an antipattern is something that the software allows you to do, but that may have an adverse functional or performance impact.
For example, consider the omnipotent-sounding "God Class/Object". In objected oriented programming, a god class is a class that controls too many classes for a given application, as illustrated by the following reference tree:
As the image illustrates, the god class uses and references too many classes.
The framework on which the application was developed does not prevent the creation of such a class, but it has many disadvantages, the primary ones being:
- Hard to maintain
- Single point of failure when the application runs
Consequently, such a class is an antipattern that you should avoid creating.
The good news is that you can identify these antipatterns and rectify them with appropriate best practices, which will make the APIs you deploy on Apigee best serve their intended purpose.
Summary of antipatterns
The following table lists some common API antipatterns:
- Issuing refresh tokens without invoking refresh flow
- Use waitForComplete() in JavaScript code
- Set a long expiration time for OAuth tokens
- Use greedy quantifiers in the RegularExpressionProtection policy
- Cache error responses
- Store data greater than 256 KB size in cache
- Invoke MessageLogging multiple times in an API proxy
- High-cardinality identifiers in Quota policy
- Configure non-distributed quota
- Reuse a Quota policy
- Use the RaiseFault policy under inappropriate conditions
- Access multi-value HTTP headers incorrectly in an API Proxy
- Use Service Callout to invoke backend service in no target proxy
- Invoke Management API calls from an API Proxy
- Invoke a proxy within a proxy using custom code or as a target
- Manage Apigee resources without using source control management
- Load Balance with a single target server with MaxFailures set to a non-zero value
- Access the request/response payload when streaming is enabled
- Define multiple ProxyEndpoints in an API Proxy
Download antipatterns eBook
In addition to the links above, you can also download the antipatterns in eBook format:

