Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Make http connection accessible in server busy mode

Featured Replies

Posted

I want to access a site (third party, I do not have any server side access) via Httpwebrequest in c#. All works well but I want to access the site most at a certain time of the day, for 4-5 minutes. But this time the server flooded by user requests and server responds very slowly.

The time is almost fixed, that is when I want to get contents from it.And it gets inaccessible for that time due to loads of user hits.

Is there any technique, that can maximize my chance to get response from that site when it even gets busy? I search a lot but found nothing. If you could help me, I would be grateful. Thanks guys.

I'am Adding request and response header for your further understanding

Request Headers
--------------------
Connection:    keepalive
Accept-Encoding:    gzip,deflate
Accept:application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
User-Agent:Mozilla/5.0 (Windows T 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36
Content-Type:application/x-www-form-urlencoded
Cookie: JSESSIONID=mWYJWy6TDfTLxJSTG8kWYgl1gLmjKvXrXQxFKwPcQTWgMSn1HlyH
Content-Length:652

Response Headers
-----------------
(Status-Line):    HTTP/1.1 200 OK
Cache-Control:    no-store
Content-Type:    text/html; charset=iso-8859-1
Server:    Microsoft-IIS/7.5
SET-COOKIE :JSESSIONID=mWYJWy6TDfTLxJSTG8kWYgl1gLmjKvXrXQxFKwPcQTWgMSn1HlyH
X-Powered-By: Servlet/2.5 JSP/2.1
Date:    Thu, 17 Dec 2015 04:30:44 GMT
Content-Length:    12467

 

 

  • Author

Dear #kao Any suggestion on this topic.

 

Welcome to the programming section.

You're getting a ~12kb response - the connection is alive. On slow connections 12kb is probably not going to make it through in 1 piece. How many seconds is slow for you?

If you could post your host here I could tell you if it is indeed slow or not.

I'd recommend to not use the low quality MS API's. They're famous for being slow. Libs that allow you to control the underlying socket are ideal, specifically the select() timeout value on the nonblocking socket.

Is it your DNS server that's getting overloaded? Perhaps a router/switch/etc in route of the client-server connection that's causing some bottleneck? Maybe a bug in your client code?

I'd verify this using netcat, telnet, traceroute, DNS lookups, etc first.

You have to answer all this before being able to optimize your client code. In my experience even the slowest servers on slowest connections can get a response back inside of 20, 25 seconds, for http at least.

In the case that the host is truly at fault (which for me has never happened), all you can is use a HTTP proxy that's geographically closer than the client is.

Bump, interested in solution as well.

Raj after searching ur skype u sent me I see u made a few accounts around here haha ; )

the sh!ttyness of MS networking API's is well known & documented, switching to an actual HTTP lib will probably solve ur problems w/out having to hire someone.

What about having a HTTP proxy? It can solve a lot of mysterious issues concerning speed and accessibility. Even set it to localhost with some port number will work sometimes.:)

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.