*This page
applies to **Apigee** and **Apigee hybrid**.*

*View [Apigee Edge](https://docs.apigee.com/api-platform/antipatterns/intro) documentation.*

This section is about common antipatterns that arise when API proxies are deployed
on Apigee.

## What is an antipattern?

An [*antipattern*](https://en.wikipedia.org/wiki/Anti-pattern) 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:
![TBD](https://docs.cloud.google.com/static/apigee/docs/api-platform/images/antipatterns/godclass.png) **Figure 1**: God class

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:

| Category | Antipatterns |
|---|---|
| Policy antipatterns | - [Issuing refresh tokens without invoking refresh flow](https://docs.cloud.google.com/apigee/docs/api-platform/antipatterns/issuing-refresh-tokens.md.txt) - [Use waitForComplete() in JavaScript code](https://docs.cloud.google.com/apigee/docs/api-platform/antipatterns/wait-for-complete.md.txt) - [Set a long expiration time for OAuth tokens](https://docs.cloud.google.com/apigee/docs/api-platform/antipatterns/oauth-long-expiration.md.txt) - [Use greedy quantifiers in the RegularExpressionProtection policy](https://docs.cloud.google.com/apigee/docs/api-platform/antipatterns/greedy-quantifiers.md.txt) - [Cache error responses](https://docs.cloud.google.com/apigee/docs/api-platform/antipatterns/caching-error.md.txt) - [Store data greater than 256 KB size in cache](https://docs.cloud.google.com/apigee/docs/api-platform/antipatterns/caching-large.md.txt) - [Invoke MessageLogging multiple times in an API proxy](https://docs.cloud.google.com/apigee/docs/api-platform/antipatterns/messagelogging-multiple-times.md.txt) - [High-cardinality identifiers in Quota policy](https://docs.cloud.google.com/apigee/docs/api-platform/antipatterns/high-cardinality-identifiers-quota-policy.md.txt) - [Configure non-distributed quota](https://docs.cloud.google.com/apigee/docs/api-platform/antipatterns/non-distributed-quota.md.txt) - [Reuse a Quota policy](https://docs.cloud.google.com/apigee/docs/api-platform/antipatterns/reusing-quota.md.txt) - [Use the RaiseFault policy under inappropriate conditions](https://docs.cloud.google.com/apigee/docs/api-platform/antipatterns/raise-fault-conditions.md.txt) - [Access multi-value HTTP headers incorrectly in an API Proxy](https://docs.cloud.google.com/apigee/docs/api-platform/antipatterns/multi-value-http-headers.md.txt) - [Use Service Callout to invoke backend service in no target proxy](https://docs.cloud.google.com/apigee/docs/api-platform/antipatterns/service-callout-no-target.md.txt) |
| Generic antipatterns | - [Invoke Management API calls from an API Proxy](https://docs.cloud.google.com/apigee/docs/api-platform/antipatterns/invoking-management.md.txt) - [Invoke a proxy within a proxy using custom code or as a target](https://docs.cloud.google.com/apigee/docs/api-platform/antipatterns/proxy-within-proxy.md.txt) - [Manage Apigee resources without using source control management](https://docs.cloud.google.com/apigee/docs/api-platform/antipatterns/no-source-control.md.txt) - [Load Balance with a single target server with MaxFailures set to a non-zero value](https://docs.cloud.google.com/apigee/docs/api-platform/antipatterns/load-balancing-maxfailures.md.txt) - [Access the request/response payload when streaming is enabled](https://docs.cloud.google.com/apigee/docs/api-platform/antipatterns/payload-with-streaming.md.txt) - [Define multiple ProxyEndpoints in an API Proxy](https://docs.cloud.google.com/apigee/docs/api-platform/antipatterns/multiple-proxyendpoints.md.txt) |
| Backend antipatterns | - [Allow a slow backend](https://docs.cloud.google.com/apigee/docs/api-platform/antipatterns/slow-backend.md.txt) - [Disable HTTP persistent (reusable keep-alive) connections](https://docs.cloud.google.com/apigee/docs/api-platform/antipatterns/disable-persistent-connections.md.txt) |

### Download antipatterns eBook

In addition to the links above, you can also download the antipatterns in eBook format:

- [The Book of Apigee Antipatterns v2.0 (PDF)](https://docs.apigee.com/files/Apigee_Edge_Antipatterns_2_0.pdf)