You're viewing **Apigee Edge** documentation.  
[Go to the
**Apigee X** documentation](http://cloud.google.com/apigee/docs/api-platform/antipatterns/intro). info

This section is about common antipatterns that are observed as part of the API proxies deployed
on the Apigee Edge platform.

The good news is that each of these antipatterns can be clearly identified and rectified with
appropriate good practices. Consequently, the APIs deployed on Edge would serve their intended
purpose and be more performant.

## Summary of antipatterns

The following table lists the antipatterns in this section:

| Category | Antipatterns |
|---|---|
| Policy antipatterns | - [Issuing refresh tokens without invoking refresh flow](https://docs.apigee.com/api-platform/antipatterns/issuing-refresh-tokens) - [Use waitForComplete() in JavaScript code](https://docs.apigee.com/api-platform/antipatterns/wait-for-complete) - [Set a long expiration time for OAuth tokens](https://docs.apigee.com/api-platform/antipatterns/oauth-long-expiration) - [Use greedy quantifiers in the RegularExpressionProtection policy](https://docs.apigee.com/api-platform/antipatterns/greedy-quantifiers) - [Cache error responses](https://docs.apigee.com/api-platform/antipatterns/caching-error) - [Store data greater than 512kb size in cache](https://docs.apigee.com/api-platform/antipatterns/caching-large) - [Log data to third party servers using the JavaScript policy](https://docs.apigee.com/api-platform/antipatterns/logging-thirdparty-js) - [Use of non-compliant JSONPath version](https://docs.apigee.com/api-platform/antipatterns/jsonpath-version) - [Invoke MessageLogging multiple times in an API proxy](https://docs.apigee.com/api-platform/antipatterns/messagelogging-multiple-times) - [High-cardinality identifiers in Quota policy](https://docs.apigee.com/api-platform/antipatterns/high-cardinality-identifiers-quota-policy) - [Configure non-distributed quota](https://docs.apigee.com/api-platform/antipatterns/non-distributed-quota) - [Reuse a Quota policy](https://docs.apigee.com/api-platform/antipatterns/reusing-quota) - [Use the RaiseFault policy under inappropriate conditions](https://docs.apigee.com/api-platform/antipatterns/raise-fault-conditions) - [Access multi-value HTTP headers incorrectly in an API Proxy](https://docs.apigee.com/api-platform/antipatterns/multi-value-http-headers) - [Use Service Callout to invoke backend service in no target proxy](https://docs.apigee.com/api-platform/antipatterns/service-callout-no-target) - Use of any OAuth V1 policies, which are deprecated. See [Deprecations](https://docs.apigee.com/release/deprecated-features#deprecations). |
| Performance antipatterns | - [Leave unused NodeJS API Proxies deployed](https://docs.apigee.com/api-platform/antipatterns/unused-nodejs) - [Impact of non-existent KVMs on latency](https://docs.apigee.com/api-platform/antipatterns/kvm) |
| Generic antipatterns | - [Invoke Management API calls from an API Proxy](https://docs.apigee.com/api-platform/antipatterns/invoking-management) - [Invoke a proxy within a proxy using custom code or as a target](https://docs.apigee.com/api-platform/antipatterns/proxy-within-proxy) - [Manage Edge resources without using source control management](https://docs.apigee.com/api-platform/antipatterns/no-source-control) - [Define multiple virtual hosts with same host alias and port number](https://docs.apigee.com/api-platform/antipatterns/multiple-vhosts) - [Load Balance with a single target server with MaxFailures set to a non-zero value](https://docs.apigee.com/api-platform/antipatterns/load-balancing-maxfailures) - [Access the request/response payload when streaming is enabled](https://docs.apigee.com/api-platform/antipatterns/payload-with-streaming) - [Define multiple ProxyEndpoints in an API Proxy](https://docs.apigee.com/api-platform/antipatterns/multiple-proxyendpoints) |
| Backend antipatterns | - [Allow a slow backend](https://docs.apigee.com/api-platform/antipatterns/slow-backend) - [Disable HTTP persistent (reusable keep-alive) connections](https://docs.apigee.com/api-platform/antipatterns/disable-persistent-connections) |
| Edge for Private Cloud antipatterns | - [Add custom information to Apigee-owned schema in Postgres database](https://docs.apigee.com/api-platform/antipatterns/postgres-schema) |

### Download antipatterns eBook

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

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

## What is an antipattern?

Wikipedia defines a software antipattern as:
>
> *In software engineering, an anti-pattern is a pattern that may be commonly used but
> is ineffective and/or counterproductive in practice.*
>
Simply put, an antipattern is something that the software allows it's "user" to do, but is
something that may have adverse functional, serviceable, or performance impact.

For example, consider the omnipotent-sounding "God Class/Object".

In objected oriented parlance, a *god class* is a class that controls too many classes for
a given application.

For example, consider an application with the following reference tree:
![](https://docs.apigee.com/static/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, creation of such a class should be avoided. It is an *antipattern*.

## Target audience

This section best serves Apigee Edge developers as they progress through the lifecycle of designing
and developing API proxies for their services. It should ideally be used as a reference guide during
the API development lifecycle and during troubleshooting.