flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution 17 Feb 2013, 12:25
Is this a public or private network? If it is public then five or ten seconds might not be enough to account for connection delays.
|
|||
![]() |
|
sleepsleep 17 Feb 2013, 13:04
private network, (i will use nginx on openbsd) for incoming public connection,
the idea for such server because i want to easily call dll function from local application ajax request. some sort of HTA application on client side. |
|||
![]() |
|
JohnFound 17 Feb 2013, 13:05
Using time for controlling something is always wrong!
(I should print this statement on cards and give one to every engineer and programmer I know. It will spare me a lot of speaking. ![]() |
|||
![]() |
|
sleepsleep 17 Feb 2013, 14:19
JohnFound wrote: Using time for controlling something is always wrong! why? what should we do with idle connection? in your opinion if not time based idle checking? |
|||
![]() |
|
JohnFound 17 Feb 2013, 14:30
I am not sure I understand what you mean, but if the connection is still connected, it means there is another application running on the other side, so you should not disconnect at all. At least not by time.
Also, if you read my statement properly, I didn't said you should not use time based control. I said that it is always wrong. But we can write wrong applications of course. ![]() |
|||
![]() |
|
AsmGuru62 17 Feb 2013, 14:48
There are some cases where an open connection is not desired.
Like the case of online banking. User did his/her banking online, but got called from a computer for a few hrs and forgot to close the session. I think that connection should time out in a few minutes of no activity. |
|||
![]() |
|
sleepsleep 17 Feb 2013, 14:49
yeap, the client is connected, but i set my own protocol that if it is my client (those who able to answer my sent question and return back answer) i will not close them, or those who init connection with KEEPALIVE string and some number
but for those that accidentally connected (or people who just like to sabotage the server or DDOS it) i want to close them asap, assume my server is able to pool only about 1000 socket, but DDOS will make the server unavailable, those socket will idle and hog up the pool. i assume what i did is correct but of course, i open to any advice, |
|||
![]() |
|
JohnFound 17 Feb 2013, 17:24
If we are talking about web server - you can always close the connection after the current request is finished. The same is true for the banking application AsmGuru62 talking about.
If you have pool of limited number of sockets, you can simply wait until this count is reached (or any other count) and then disconnect the socket that has longest idle state. This way you will always disconnect at the last possible moment and not by time but by events. |
|||
![]() |
|
sleepsleep 17 Feb 2013, 17:47
JohnFound wrote:
ok, i understand, |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.