# Verify Apollo Server Plugin Drain Http Server is setup correctly

**URL:** <https://community.apollographql.com/t/verify-apollo-server-plugin-drain-http-server-is-setup-correctly/5793>\
**Category:** Server\
**Tags:** server, federation\
**Created:** [February 23, 2023, 6:51pm UTC](https://community.apollographql.com/t/verify-apollo-server-plugin-drain-http-server-is-setup-correctly/5793 "2023-02-23T18:51:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![brettski](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/brettski/32/682_2.png) [@brettski](https://community.apollographql.com/u/brettski)\
**Post date:** [February 23, 2023, 6:51pm UTC](https://community.apollographql.com/t/verify-apollo-server-plugin-drain-http-server-is-setup-correctly/5793/1 "2023-02-23T18:51:20Z")

</div>

Greeting,

I am adding `ApolloServerPluginDrainHttpServer` to our configuration and would like to know if there is a way to verify that `ApolloServerPluginDrainHttpServer` is setup correctly and actually is working as expected?

In addition we are running federation, so I am assuming I should use `ApolloServerPluginDrainHttpServer` on the gateway and all children, is this assumption correct?

Thank you

btw, I had to set ApolloServerPluginDrainHttpServer to Apollo Server Plugin Drain Http Server in the title so it would be accepted by the Discourse (threw error, word too long).

---

<div class="post-metadata">

**Author:** ![glasser](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/glasser/32/48_2.png) [@glasser](https://community.apollographql.com/u/glasser)\
**Post date:** [February 24, 2023, 1:21am UTC](https://community.apollographql.com/t/verify-apollo-server-plugin-drain-http-server-is-setup-correctly/5793/2 "2023-02-24T01:21:00Z")

</div>

Write a tiny plugin with (say) an `async requestDidStart` handler that takes like five seconds to resolve. Something like this (just typing it here, not checking that it builds):

```auto
new ApolloServer({
  plugins: [{
    requestDidStart() {
      return new Promise(resolve => {
        setTimeout(() => {
          console.log("made it five seconds");
          resolve();
        }, 5000);
      });
    }
  }],
  // ...
})

```

Start your server, issue a request to it, quickly send your server a SIGINT (eg, hit Ctrl-C), and hopefully observe that about five seconds later, the log message gets printed, the client gets its response, and the server exits.
