Determining active TCP connections via ELB logs












0















I have an issue where my application crashes and it appears to correspond with an increase in Estimated Active Connections at my ELB. I've been digging through ELB logs and I'm having a hard time reconciling what I see in the logs vs. what the client is telling they are sending.



An example:



Client A (source IP 192.168.0.100) states they are "using 64 threads" to send simultaneous requests to my API, but when I check my ELB logs for a given hour, I only see 4-8 unique ports that appear with their source IP:



2018-11-10T12:00:42 MyLoadBalancer 192.168.0.100:20635 10.65.65.1:80...
2018-11-10T12:00:42 MyLoadBalancer 192.168.0.100:20647 10.65.65.1:80...
2018-11-10T12:00:42 MyLoadBalancer 192.168.0.100:20649 10.65.65.1:80...
2018-11-10T12:00:42 MyLoadBalancer 192.168.0.100:20638 10.65.65.1:80...
...
2018-11-10T12:00:43 MyLoadBalancer 192.168.0.100:20647 10.65.65.1:80...
2018-11-10T12:00:44 MyLoadBalancer 192.168.0.100:20635 10.65.65.1:80...


In contrast, Client B (source IP 172.16.0.100) appears in my ELB logs and it looks like they are opening 50+ TCP connections simultaneously:



2018-11-10T12:00:43 MyLoadBalancer 172.16.0.100:36500 10.65.65.1:80...
2018-11-10T12:00:43 MyLoadBalancer 172.16.0.100:36501 10.65.65.1:80...
2018-11-10T12:00:43 MyLoadBalancer 172.16.0.100:36502 10.65.65.1:80...
2018-11-10T12:00:43 MyLoadBalancer 172.16.0.100:36503 10.65.65.1:80...
....
2018-11-10T12:00:43 MyLoadBalancer 172.16.0.100:36550 10.65.65.1:80...


Questions:




  1. If a client says they are using X number of threads in their client application when calling my API, should I expect to see around X unique port numbers at any given time in the ELB logs?

  2. Does 1 port number = 1 distinct TCP connection?

  3. Is it possible to limit a client from opening more than X connections simultaneously?


Thanks!










share|improve this question





























    0















    I have an issue where my application crashes and it appears to correspond with an increase in Estimated Active Connections at my ELB. I've been digging through ELB logs and I'm having a hard time reconciling what I see in the logs vs. what the client is telling they are sending.



    An example:



    Client A (source IP 192.168.0.100) states they are "using 64 threads" to send simultaneous requests to my API, but when I check my ELB logs for a given hour, I only see 4-8 unique ports that appear with their source IP:



    2018-11-10T12:00:42 MyLoadBalancer 192.168.0.100:20635 10.65.65.1:80...
    2018-11-10T12:00:42 MyLoadBalancer 192.168.0.100:20647 10.65.65.1:80...
    2018-11-10T12:00:42 MyLoadBalancer 192.168.0.100:20649 10.65.65.1:80...
    2018-11-10T12:00:42 MyLoadBalancer 192.168.0.100:20638 10.65.65.1:80...
    ...
    2018-11-10T12:00:43 MyLoadBalancer 192.168.0.100:20647 10.65.65.1:80...
    2018-11-10T12:00:44 MyLoadBalancer 192.168.0.100:20635 10.65.65.1:80...


    In contrast, Client B (source IP 172.16.0.100) appears in my ELB logs and it looks like they are opening 50+ TCP connections simultaneously:



    2018-11-10T12:00:43 MyLoadBalancer 172.16.0.100:36500 10.65.65.1:80...
    2018-11-10T12:00:43 MyLoadBalancer 172.16.0.100:36501 10.65.65.1:80...
    2018-11-10T12:00:43 MyLoadBalancer 172.16.0.100:36502 10.65.65.1:80...
    2018-11-10T12:00:43 MyLoadBalancer 172.16.0.100:36503 10.65.65.1:80...
    ....
    2018-11-10T12:00:43 MyLoadBalancer 172.16.0.100:36550 10.65.65.1:80...


    Questions:




    1. If a client says they are using X number of threads in their client application when calling my API, should I expect to see around X unique port numbers at any given time in the ELB logs?

    2. Does 1 port number = 1 distinct TCP connection?

    3. Is it possible to limit a client from opening more than X connections simultaneously?


    Thanks!










    share|improve this question



























      0












      0








      0








      I have an issue where my application crashes and it appears to correspond with an increase in Estimated Active Connections at my ELB. I've been digging through ELB logs and I'm having a hard time reconciling what I see in the logs vs. what the client is telling they are sending.



      An example:



      Client A (source IP 192.168.0.100) states they are "using 64 threads" to send simultaneous requests to my API, but when I check my ELB logs for a given hour, I only see 4-8 unique ports that appear with their source IP:



      2018-11-10T12:00:42 MyLoadBalancer 192.168.0.100:20635 10.65.65.1:80...
      2018-11-10T12:00:42 MyLoadBalancer 192.168.0.100:20647 10.65.65.1:80...
      2018-11-10T12:00:42 MyLoadBalancer 192.168.0.100:20649 10.65.65.1:80...
      2018-11-10T12:00:42 MyLoadBalancer 192.168.0.100:20638 10.65.65.1:80...
      ...
      2018-11-10T12:00:43 MyLoadBalancer 192.168.0.100:20647 10.65.65.1:80...
      2018-11-10T12:00:44 MyLoadBalancer 192.168.0.100:20635 10.65.65.1:80...


      In contrast, Client B (source IP 172.16.0.100) appears in my ELB logs and it looks like they are opening 50+ TCP connections simultaneously:



      2018-11-10T12:00:43 MyLoadBalancer 172.16.0.100:36500 10.65.65.1:80...
      2018-11-10T12:00:43 MyLoadBalancer 172.16.0.100:36501 10.65.65.1:80...
      2018-11-10T12:00:43 MyLoadBalancer 172.16.0.100:36502 10.65.65.1:80...
      2018-11-10T12:00:43 MyLoadBalancer 172.16.0.100:36503 10.65.65.1:80...
      ....
      2018-11-10T12:00:43 MyLoadBalancer 172.16.0.100:36550 10.65.65.1:80...


      Questions:




      1. If a client says they are using X number of threads in their client application when calling my API, should I expect to see around X unique port numbers at any given time in the ELB logs?

      2. Does 1 port number = 1 distinct TCP connection?

      3. Is it possible to limit a client from opening more than X connections simultaneously?


      Thanks!










      share|improve this question
















      I have an issue where my application crashes and it appears to correspond with an increase in Estimated Active Connections at my ELB. I've been digging through ELB logs and I'm having a hard time reconciling what I see in the logs vs. what the client is telling they are sending.



      An example:



      Client A (source IP 192.168.0.100) states they are "using 64 threads" to send simultaneous requests to my API, but when I check my ELB logs for a given hour, I only see 4-8 unique ports that appear with their source IP:



      2018-11-10T12:00:42 MyLoadBalancer 192.168.0.100:20635 10.65.65.1:80...
      2018-11-10T12:00:42 MyLoadBalancer 192.168.0.100:20647 10.65.65.1:80...
      2018-11-10T12:00:42 MyLoadBalancer 192.168.0.100:20649 10.65.65.1:80...
      2018-11-10T12:00:42 MyLoadBalancer 192.168.0.100:20638 10.65.65.1:80...
      ...
      2018-11-10T12:00:43 MyLoadBalancer 192.168.0.100:20647 10.65.65.1:80...
      2018-11-10T12:00:44 MyLoadBalancer 192.168.0.100:20635 10.65.65.1:80...


      In contrast, Client B (source IP 172.16.0.100) appears in my ELB logs and it looks like they are opening 50+ TCP connections simultaneously:



      2018-11-10T12:00:43 MyLoadBalancer 172.16.0.100:36500 10.65.65.1:80...
      2018-11-10T12:00:43 MyLoadBalancer 172.16.0.100:36501 10.65.65.1:80...
      2018-11-10T12:00:43 MyLoadBalancer 172.16.0.100:36502 10.65.65.1:80...
      2018-11-10T12:00:43 MyLoadBalancer 172.16.0.100:36503 10.65.65.1:80...
      ....
      2018-11-10T12:00:43 MyLoadBalancer 172.16.0.100:36550 10.65.65.1:80...


      Questions:




      1. If a client says they are using X number of threads in their client application when calling my API, should I expect to see around X unique port numbers at any given time in the ELB logs?

      2. Does 1 port number = 1 distinct TCP connection?

      3. Is it possible to limit a client from opening more than X connections simultaneously?


      Thanks!







      amazon-web-services networking tcp aws-elb






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 24 '18 at 15:02







      suspicious_williams

















      asked Nov 24 '18 at 12:22









      suspicious_williamssuspicious_williams

      31125




      31125
























          0






          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53458098%2fdetermining-active-tcp-connections-via-elb-logs%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53458098%2fdetermining-active-tcp-connections-via-elb-logs%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Costa Masnaga

          Fotorealismo

          Sidney Franklin