Mariusz Krzanowski blog

Tag: Web Applications

Long polling as a cure for message push mechanism

Introduction

Many times in your life, you will have the situation when your server must push information to your customer. When you are not limited to HTTP/HTTPS you can setup TCP/IP connection and problems are solved. Unfortunately we are living in a world dominated by HTTP protocols. When you ask someone how to address such a challenge you can hear from your colleagues that Webhook (https://en.wikipedia.org/wiki/Webhook) is a solution for your problem. My goal is to convince you to try to think outside the box and focus on long pooling mechanisms.

Long ping response and slow network kill your application

Business requires fast software delivery. This sometimes leads to a situation in which developers are focused less on performance and more on business requirements. The problem is that badly designed architecture can unable to fix performance in the future. Many times I have explained that page with a total weight of about 2 MB is too large. I  have explained that server side has a limited bandwidth. For 1Gb/s connection speed at server side you can handle about 50 concurrent users in the same time to show them full content in 1 second. I also tell my colleagues that we have to reduce number of requests. Each request not only consumes browser connection pool limit, but also server resources. When clients are located far from our server, pages can load very slowly. When I was on Galapagos I realized (again) how slow can a network connection be and how important wise web design is.

Powered by WordPress & Theme by Anders Norén