473,805 Members | 2,030 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

thousands of request in one port per second

Greetings All,

i think this is the right group to post this question.

i am working on client server model. in this model the client is
sending request in thousands in number. for example per sec around
2000 to 3000 request is coming. so the server is listening in the udp
port. after some time the most of the request is dropped. how can
manage this problem. is the multi threading will help ? but it is UDP
port i dont know how handle this request in multi threading model. or
is there any way i can handle this problem ?

thanks in advance

Prakash
Oct 9 '08 #1
29 1926
Praki wrote:
>
i think this is the right group to post this question.

i am working on client server model. in this model the client is
sending request in thousands in number. for example per sec
around 2000 to 3000 request is coming. so the server is listening
in the udp port. after some time the most of the request is
dropped. how can manage this problem. is the multi threading will
help ? but it is UDP port i dont know how handle this request in
multi threading model. or is there any way i can handle this
problem ?
Wrong newsgroup. We handle standard C, as described in the C
standard. The language contains none of clients, servers,
threading, UDP, etc. You probably need a newsgroup that deals with
your particular system.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home .att.net>
Try the download section.
Oct 9 '08 #2
On 9 Oct 2008 at 14:32, Praki wrote:
i think this is the right group to post this question.
It's a perfectly appropriate group. Please ignore CBF, who is a known
troll, and senile to boot.
i am working on client server model. in this model the client is
sending request in thousands in number. for example per sec around
2000 to 3000 request is coming. so the server is listening in the udp
port. after some time the most of the request is dropped. how can
manage this problem. is the multi threading will help ? but it is UDP
port i dont know how handle this request in multi threading model. or
is there any way i can handle this problem ?
If dropped packets is a serious problem, you shouldn't be using UDP.

You could try increasing the size of the receiving buffer, e.g.:

int bufsize = 1<<16;
setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &bufsize, sizeof bufsize);

If that fails, you could maintain your own buffer: your main thread
could just transfer data from the socket buffer to your buffer, and then
a worker thread could process items from your buffer. But ultimately, if
data is coming in faster than you can process it, then any buffer will
eventually overflow...

Oct 9 '08 #3
Praki <vi************ ***@gmail.comwr ites:
Greetings All,

i think this is the right group to post this question.
[...]

I'm afraid it really isn't. You'll bet better information from a
larger pool of experts in a group that deals with your operating
system, most likely comp.unix.progr ammer if you're on Linux or some
other Unix-like system, or comp.os.ms-windows.program mer.win32 or one
of the microsoft.* groups if you're on MS Windows.

I'm sorry that you've run into Antoninus Twink, a troll who sometimes
pretends to be helpful. If he were really interested in helping you
solve your problem rather than disrupting this newsgroup, he probably
would have told you about the existence of other more appropriate
groups.

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Oct 9 '08 #4
CBFalconer <cb********@yah oo.comwrites:
Praki wrote:
>>
i think this is the right group to post this question.

i am working on client server model. in this model the client is
sending request in thousands in number. for example per sec
around 2000 to 3000 request is coming. so the server is listening
in the udp port. after some time the most of the request is
dropped. how can manage this problem. is the multi threading will
help ? but it is UDP port i dont know how handle this request in
multi threading model. or is there any way i can handle this
problem ?

Wrong newsgroup. We handle standard C, as described in the C
standard. The language contains none of clients, servers,
threading, UDP, etc. You probably need a newsgroup that deals with
your particular system.
Don't be ridiculous. Many aspects of these things can be done in standard
C and this is a good place to ask C programmers of their thoughts and
experiences. The fact that you have never programmed on a real
professional C project does not mean the rest here have not.

Oct 10 '08 #5
On Oct 9, 7:32*am, Praki <visitprakashin ...@gmail.comwr ote:
Greetings All,

i think this is the right group to post this question.
Probably not. I suggest news:comp.soft-sys.ace if you don't mind C++
solutions.
Using ACE would allow a fast, portable and reliable approach.
Building clients and servers with ACE is as easy as falling off a log.
i am working on client server model. in this model the client is
sending request in thousands in number. for example per sec around
2000 to 3000 request is coming. so the server is listening in the udp
port. after some time the most of the request is dropped. how can
manage this problem. is the multi threading will help *? but it is UDP
port i dont know how handle this request in multi threading model. or
is there *any way i can handle this problem ?
UDP gives no guarantees about delivery. If you need to scale lots of
requests, I suggest looking into memcached.
The memcached tool set is also a little unreliable (because it is a
cache), but it will scale to any load you can imagine.
http://en.wikipedia.org/wiki/Memcached
Oct 10 '08 #6
Praki wrote:
Greetings All,

i think this is the right group to post this question.

i am working on client server model. in this model the client is
sending request in thousands in number. for example per sec around
2000 to 3000 request is coming. so the server is listening in the udp
port. after some time the most of the request is dropped. how can
manage this problem. is the multi threading will help ? but it is UDP
port i dont know how handle this request in multi threading model. or
is there any way i can handle this problem ?
If your server can't keep up, you should profile the code and see where
the bottlenecks are. It you fix those and it still can't keep up, use
faster hardware. If that can't keep up, use more cores and threading.
If that can't keep up, use a more appropriate protocol.

Or save a lot of time and do the last first.

--
Ian Collins
Oct 10 '08 #7
user923005 wrote:
>
UDP gives no guarantees about delivery. If you need to scale lots of
requests, I suggest looking into memcached.
The memcached tool set is also a little unreliable (because it is a
cache), but it will scale to any load you can imagine.
http://en.wikipedia.org/wiki/Memcached
While memcached is a good tool, if the load is continuous and the server
can't keep up, the cache will fill and packets will continue to be dropped.

--
Ian Collins
Oct 10 '08 #8
Richard wrote:
>
Don't be ridiculous. Many aspects of these things can be done in standard
C and this is a good place to ask C programmers of their thoughts and
experiences.
OK, put up or shut up. What are your thoughts and experiences? Or are
you just here to snipe form the sidelines?

--
Ian Collins
Oct 10 '08 #9
On Oct 9, 5:46*pm, Ian Collins <ian-n...@hotmail.co mwrote:
user923005 wrote:
UDP gives no guarantees about delivery. *If you need to scale lots of
requests, I suggest looking into memcached.
The memcached tool set is also a little unreliable (because it is a
cache), but it will scale to any load you can imagine.
http://en.wikipedia.org/wiki/Memcached

While memcached is a good tool, if the load is continuous and the server
can't keep up, the cache will fill and packets will continue to be dropped.
From the memcached FAQ:

"Finally, memcached itself is implemented as a non-blocking event-
based server. This is an architecture used to solve the C10K problem
and scale like crazy.

What's the big benefit for all this?
Carefully read the above entry (How does memcached work?). The big
benefit, when dealing with giant systems, is memcached's ability to
massively scale out. Since the client does one layer of hashing, it
becomes entirely trivial to add dozens of nodes to the cluster.
There's no interconnect to overload, or multicast protocol to implode.
It Just Works. Run out of memory? Add a few more nodes. Run out of
CPU? Add a few more nodes. Have some spare RAM here and there? Add
nodes!

It's incredibly easy to build on memcached's basic principles to
implement many different kinds of caching architectures. Hopefully
detailed elsewhere in the FAQ."

Oct 10 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
10652
by: turnit \(removethis\) | last post by:
I have a login form that uses the post method to carry the information to the next page. The form works just fine in ie6.0, but fails in mozilla and fails in ie5.2 on a mac. "HTTP/1.1 400 Bad Request" was the original error msg now that I reinstalled iislockdown and urscan I get "The parameter is incorrect." If I use the get method with this form it works just fine on everything. I can't say for certain but I think this problem started...
9
2484
by: Phil Jenson | last post by:
I am try to evaluate the most efficient method of handling thousands of simultaneous TCP connects each of which remain connected to the server for hours and pass a small amount of data usually once a minute. The data received is logged in a SQL Server database. The only method I have found of reading each socket requires a thread for each connection which blocks waiting for data. This appears to be very inefficient as it will result in...
6
3150
by: Daniel Rimmelzwaan | last post by:
I want to send a biztalk document to an aspx page, and I need to see some sample code, because I just can't make it work. I have a port with transport type HTTP, pointing to my aspx page, something like http://myserver/mypage.aspx. From there it gets blurry, because I just can't figure out how to do the rest. Does anybody have a sample page for me that I can take a look at? Just a simple one that takes whatever biztalk sends and saves it...
2
3803
by: sushi | last post by:
Hello, I want to send a HTTP post request. The url will be given in the format http://host:port/remainder-of-URL where host is the DNS name or IP address of the host where the receiver is listening for incoming HTTP connections. port is the TCP port on which the receiver is listening for incoming HTTP
11
2853
by: seb | last post by:
Hello, **************** What I need : **************** I need to write a scanner that test all the IP adresses that repond on a given port. The Ip list is of roughly of length 200. I need to get the response every 60 seconds (or better).
0
9716
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10609
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10360
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9185
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7646
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6876
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5542
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3845
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.