SlideShare uma empresa Scribd logo
1 de 29
Netprog 2002 - Client/Server Issues1
Issues in Client/ServerIssues in Client/Server
ProgrammingProgramming
Refs: Chapter 27Refs: Chapter 27
Netprog 2002 - Client/Server Issues2
Issues in Client ProgrammingIssues in Client Programming
Identifying the Server.Identifying the Server.
Looking up a IP address.Looking up a IP address.
Looking up a well known portLooking up a well known port
name.name.
Specifying a local IP address.Specifying a local IP address.
UDP client design.UDP client design.
TCP client design.TCP client design.
Netprog 2002 - Client/Server Issues3
Identifying the ServerIdentifying the Server
Options:Options:
– hard-coded into the client program.hard-coded into the client program.
– require that the user identify the server.require that the user identify the server.
– read from a configuration file.read from a configuration file.
– use a separate protocol/network service touse a separate protocol/network service to
lookup the identity of the server.lookup the identity of the server.
Netprog 2002 - Client/Server Issues4
Identifying a TCP/IP server.Identifying a TCP/IP server.
Need an IP address, protocol and port.Need an IP address, protocol and port.
– We often useWe often use host nameshost names instead of IPinstead of IP
addresses.addresses.
– usually the protocol (UDP vs. TCP) is notusually the protocol (UDP vs. TCP) is not
specified by the user.specified by the user.
– often the port is not specified by the user.often the port is not specified by the user.
Can you name one common exception ?Can you name one common exception ?
Netprog 2002 - Client/Server Issues5
Services and PortsServices and Ports
Many services are available via “wellMany services are available via “well
known” addresses (names).known” addresses (names).
There is a mapping of service names toThere is a mapping of service names to
port numbers:port numbers:
struct *servent getservbyname(struct *servent getservbyname(
char *service, char *protocol );char *service, char *protocol );
servent->s_portservent->s_port is the port numberis the port number
in network byte order.in network byte order.
Netprog 2002 - Client/Server Issues6
Specifying a Local AddressSpecifying a Local Address
When a client creates and binds aWhen a client creates and binds a
socket it must specify a local port andsocket it must specify a local port and
IP address.IP address.
Typically a client doesn’t care what portTypically a client doesn’t care what port
it is on:it is on:
haddr->port = htons(0);haddr->port = htons(0);
give me any available port !give me any available port !
Netprog 2002 - Client/Server Issues7
Local IP addressLocal IP address
A client can also ask the operating systemA client can also ask the operating system
to take care of specifying the local IPto take care of specifying the local IP
address:address:
haddr->sin_addr.s_addr=haddr->sin_addr.s_addr=
htonl(INADDR_ANY);htonl(INADDR_ANY);
Give me the appropriate addressGive me the appropriate address
Netprog 2002 - Client/Server Issues8
UDP Client DesignUDP Client Design
Establish server address (IP and port).Establish server address (IP and port).
Allocate a socket.Allocate a socket.
Specify that any valid local port and IPSpecify that any valid local port and IP
address can be used.address can be used.
Communicate with server (send, recv)Communicate with server (send, recv)
Close the socket.Close the socket.
Netprog 2002 - Client/Server Issues9
Connected mode UDPConnected mode UDP
A UDP client can call connect() toA UDP client can call connect() to
establishestablish the address of the server.the address of the server.
The UDP client can then use read() andThe UDP client can then use read() and
write() or send() and recv().write() or send() and recv().
A UDP client using a connected modeA UDP client using a connected mode
socket can only talk to one serversocket can only talk to one server
(using the connected-mode socket).(using the connected-mode socket).
Netprog 2002 - Client/Server Issues10
TCP Client DesignTCP Client Design
Establish server address (IP and port).Establish server address (IP and port).
Allocate a socket.Allocate a socket.
Specify that any valid local port and IPSpecify that any valid local port and IP
address can be used.address can be used.
Call connect()Call connect()
Communicate with server (read,write).Communicate with server (read,write).
Close the connection.Close the connection.
Netprog 2002 - Client/Server Issues11
Closing a TCP socketClosing a TCP socket
Many TCP based application protocolsMany TCP based application protocols
support multiple requests and/orsupport multiple requests and/or
variable length requests over a singlevariable length requests over a single
TCP connection.TCP connection.
How does the server known when theHow does the server known when the
client is done (and it is OK to close theclient is done (and it is OK to close the
socket) ?socket) ?
Netprog 2002 - Client/Server Issues12
Partial ClosePartial Close
One solution is for the client to shutOne solution is for the client to shut
down only it’s writing end of the socket.down only it’s writing end of the socket.
TheThe shutdown() system call providessystem call provides
this function.this function.
shutdown( int s, int direction);shutdown( int s, int direction);
– direction can be 0 to close the reading enddirection can be 0 to close the reading end
or 1 to close the writing end.or 1 to close the writing end.
– shutdown sends info to the other process!shutdown sends info to the other process!
Netprog 2002 - Client/Server Issues13
TCP sockets programmingTCP sockets programming
Common problem areas:Common problem areas:
– null termination of strings.null termination of strings.
– reads don’t correspond to writes.reads don’t correspond to writes.
– synchronization (including close()).synchronization (including close()).
– ambiguous protocol.ambiguous protocol.
Netprog 2002 - Client/Server Issues14
TCP ReadsTCP Reads
Each call to read() on a TCP socketEach call to read() on a TCP socket
returns any available data (up to areturns any available data (up to a
maximum).maximum).
TCP buffers data at both ends of theTCP buffers data at both ends of the
connection.connection.
You must be prepared to accept data 1You must be prepared to accept data 1
byte at a time from a TCP socket!byte at a time from a TCP socket!
Netprog 2002 - Client/Server Issues15
Server DesignServer Design
IterativeIterative
ConnectionlessConnectionless
IterativeIterative
Connection-OrientedConnection-Oriented
ConcurrentConcurrent
Connection-OrientedConnection-Oriented
ConcurrentConcurrent
ConnectionlessConnectionless
Netprog 2002 - Client/Server Issues16
Concurrent vs. IterativeConcurrent vs. Iterative
Iterative
Small, fixed size requests
Easy to program
Iterative
Small, fixed size requests
Easy to program
Concurrent
Large or variable size requests
Harder to program
Typically uses more system resources
Concurrent
Large or variable size requests
Harder to program
Typically uses more system resources
Netprog 2002 - Client/Server Issues17
Connectionless vs.Connectionless vs.
Connection-OrientedConnection-Oriented
Connection-Oriented
EASY TO PROGRAM
transport protocol handles the tough stuff.
requires separate socket for each connection.
Connection-Oriented
EASY TO PROGRAM
transport protocol handles the tough stuff.
requires separate socket for each connection.
Connectionless
less overhead
no limitation on number of clients
Connectionless
less overhead
no limitation on number of clients
Netprog 2002 - Client/Server Issues18
StatelessnessStatelessness
State:State: Information that a serverInformation that a server
maintains about the status of ongoingmaintains about the status of ongoing
client interactions.client interactions.
Connectionless servers that keep stateConnectionless servers that keep state
information must be designed carefully!information must be designed carefully!
Messages can be duplicated!Messages can be duplicated!
Netprog 2002 - Client/Server Issues19
The Dangers of StatefullnessThe Dangers of Statefullness
Clients can go down at any time.Clients can go down at any time.
Client hosts can reboot many times.Client hosts can reboot many times.
The network can lose messages.The network can lose messages.
The network can duplicate messages.The network can duplicate messages.
Netprog 2002 - Client/Server Issues20
Concurrent ServerConcurrent Server
Design AlternativesDesign Alternatives
One child per clientOne child per client
Spawn one thread per clientSpawn one thread per client
Preforking multiple processesPreforking multiple processes
Prethreaded ServerPrethreaded Server
Netprog 2002 - Client/Server Issues21
One child per clientOne child per client
Traditional Unix server:Traditional Unix server:
– TCP: after call toTCP: after call to accept(),accept(), callcall fork().fork().
– UDP: afterUDP: after recvfrom(),recvfrom(), callcall fork().fork().
– Each process needs only a few sockets.Each process needs only a few sockets.
– Small requests can be serviced in a smallSmall requests can be serviced in a small
amount of time.amount of time.
Parent process needs to clean up afterParent process needs to clean up after
children!!!! (callchildren!!!! (call wait()wait() ).).
Netprog 2002 - Client/Server Issues22
One thread per clientOne thread per client
Almost like using fork - callAlmost like using fork - call
pthread_create instead.pthread_create instead.
Using threads makes it easier (lessUsing threads makes it easier (less
overhead) to have sibling processesoverhead) to have sibling processes
share information.share information.
Sharing information must be doneSharing information must be done
carefully (use pthread_mutex)carefully (use pthread_mutex)
Netprog 2002 - Client/Server Issues23
PrePrefork()fork()’d Server’d Server
Creating a new process for each clientCreating a new process for each client
is expensive.is expensive.
We can create a bunch of processes,We can create a bunch of processes,
each of which can take care of a client.each of which can take care of a client.
Each child process is an iterativeEach child process is an iterative
server.server.
Netprog 2002 - Client/Server Issues24
PrePrefork()fork()’d TCP Server’d TCP Server
Initial process creates socket and bindsInitial process creates socket and binds
to well known address.to well known address.
Process now callsProcess now calls fork()fork() a bunch ofa bunch of
times.times.
All children callAll children call accept().accept().
The next incoming connection will beThe next incoming connection will be
handed to one child.handed to one child.
Netprog 2002 - Client/Server Issues25
PreforkingPreforking
As the book shows, having too manyAs the book shows, having too many
preforked children can be bad.preforked children can be bad.
Using dynamic process allocationUsing dynamic process allocation
instead of a hard-coded number ofinstead of a hard-coded number of
children can avoid problems.children can avoid problems.
The parent process just manages theThe parent process just manages the
children, doesn’t worry about clients.children, doesn’t worry about clients.
Netprog 2002 - Client/Server Issues26
Sockets library vs. system callSockets library vs. system call
A preforked TCP server won’t usuallyA preforked TCP server won’t usually
work the way we want ifwork the way we want if socketssockets is notis not
part of the kernel:part of the kernel:
– calling accept() is a library call, not ancalling accept() is a library call, not an
atomic operation.atomic operation.
We can get around this by making sureWe can get around this by making sure
only one child calls accept() at a timeonly one child calls accept() at a time
using some locking scheme.using some locking scheme.
Netprog 2002 - Client/Server Issues27
Prethreaded ServerPrethreaded Server
Same benefits as preforking.Same benefits as preforking.
Can also have the main thread do allCan also have the main thread do all
the calls to accept() and hand off eachthe calls to accept() and hand off each
client to an existing thread.client to an existing thread.
Netprog 2002 - Client/Server Issues28
What’s the best server designWhat’s the best server design
for my application?for my application?
Many factors:Many factors:
– expected number of simultaneous clients.expected number of simultaneous clients.
– Transaction size (time to compute orTransaction size (time to compute or
lookup the answer)lookup the answer)
– Variability in transaction size.Variability in transaction size.
– Available system resources (perhaps whatAvailable system resources (perhaps what
resources can be required in order to runresources can be required in order to run
the service).the service).
Netprog 2002 - Client/Server Issues29
Server DesignServer Design
It is important to understand the issuesIt is important to understand the issues
and options.and options.
Knowledge of queuing theory can be aKnowledge of queuing theory can be a
big help.big help.
You might need to test a fewYou might need to test a few
alternatives to determine the bestalternatives to determine the best
design.design.

Mais conteúdo relacionado

Mais procurados

Networking in Java with NIO and Netty
Networking in Java with NIO and NettyNetworking in Java with NIO and Netty
Networking in Java with NIO and NettyConstantine Slisenka
 
Socket programming using java
Socket programming using javaSocket programming using java
Socket programming using javaUC San Diego
 
us-17-Tsai-A-New-Era-Of-SSRF-Exploiting-URL-Parser-In-Trending-Programming-La...
us-17-Tsai-A-New-Era-Of-SSRF-Exploiting-URL-Parser-In-Trending-Programming-La...us-17-Tsai-A-New-Era-Of-SSRF-Exploiting-URL-Parser-In-Trending-Programming-La...
us-17-Tsai-A-New-Era-Of-SSRF-Exploiting-URL-Parser-In-Trending-Programming-La...sonjeku1
 
Ipv6 cheat sheet
Ipv6 cheat sheetIpv6 cheat sheet
Ipv6 cheat sheetSwarup Hait
 
Kernel Recipes 2013 - Deciphering Oopsies
Kernel Recipes 2013 - Deciphering OopsiesKernel Recipes 2013 - Deciphering Oopsies
Kernel Recipes 2013 - Deciphering OopsiesAnne Nicolas
 
Ipv6 cheat sheet
Ipv6 cheat sheetIpv6 cheat sheet
Ipv6 cheat sheetjulianlz
 
A Short Java Socket Tutorial
A Short Java Socket TutorialA Short Java Socket Tutorial
A Short Java Socket TutorialGuo Albert
 
Application Layer and Socket Programming
Application Layer and Socket ProgrammingApplication Layer and Socket Programming
Application Layer and Socket Programmingelliando dias
 
Nessus scan report using the defualt scan policy - Tareq Hanaysha
Nessus scan report using the defualt scan policy - Tareq HanayshaNessus scan report using the defualt scan policy - Tareq Hanaysha
Nessus scan report using the defualt scan policy - Tareq HanayshaHanaysha
 
Neighbor Discovery Deep Dive – IPv6-Networking-Referat
Neighbor Discovery Deep Dive – IPv6-Networking-ReferatNeighbor Discovery Deep Dive – IPv6-Networking-Referat
Neighbor Discovery Deep Dive – IPv6-Networking-ReferatDigicomp Academy AG
 
Ports and protocols
Ports and protocolsPorts and protocols
Ports and protocolssiva rama
 
Network Traffic Search using Apache HBase
Network Traffic Search using Apache HBaseNetwork Traffic Search using Apache HBase
Network Traffic Search using Apache HBaseEvans Ye
 
20 common port numbers and their purposes
20 common port numbers and their purposes 20 common port numbers and their purposes
20 common port numbers and their purposes salamassh
 

Mais procurados (20)

Networking in Java with NIO and Netty
Networking in Java with NIO and NettyNetworking in Java with NIO and Netty
Networking in Java with NIO and Netty
 
Socket programing
Socket programingSocket programing
Socket programing
 
6.Routing
6.Routing6.Routing
6.Routing
 
Socket programming using java
Socket programming using javaSocket programming using java
Socket programming using java
 
us-17-Tsai-A-New-Era-Of-SSRF-Exploiting-URL-Parser-In-Trending-Programming-La...
us-17-Tsai-A-New-Era-Of-SSRF-Exploiting-URL-Parser-In-Trending-Programming-La...us-17-Tsai-A-New-Era-Of-SSRF-Exploiting-URL-Parser-In-Trending-Programming-La...
us-17-Tsai-A-New-Era-Of-SSRF-Exploiting-URL-Parser-In-Trending-Programming-La...
 
Ipv6 cheat sheet
Ipv6 cheat sheetIpv6 cheat sheet
Ipv6 cheat sheet
 
Kernel Recipes 2013 - Deciphering Oopsies
Kernel Recipes 2013 - Deciphering OopsiesKernel Recipes 2013 - Deciphering Oopsies
Kernel Recipes 2013 - Deciphering Oopsies
 
Ipv6 cheat sheet
Ipv6 cheat sheetIpv6 cheat sheet
Ipv6 cheat sheet
 
A Short Java Socket Tutorial
A Short Java Socket TutorialA Short Java Socket Tutorial
A Short Java Socket Tutorial
 
Naked BGP
Naked BGPNaked BGP
Naked BGP
 
Tcp 6[1]
Tcp 6[1]Tcp 6[1]
Tcp 6[1]
 
Java sockets
Java socketsJava sockets
Java sockets
 
Application Layer and Socket Programming
Application Layer and Socket ProgrammingApplication Layer and Socket Programming
Application Layer and Socket Programming
 
Nessus scan report using the defualt scan policy - Tareq Hanaysha
Nessus scan report using the defualt scan policy - Tareq HanayshaNessus scan report using the defualt scan policy - Tareq Hanaysha
Nessus scan report using the defualt scan policy - Tareq Hanaysha
 
Neighbor Discovery Deep Dive – IPv6-Networking-Referat
Neighbor Discovery Deep Dive – IPv6-Networking-ReferatNeighbor Discovery Deep Dive – IPv6-Networking-Referat
Neighbor Discovery Deep Dive – IPv6-Networking-Referat
 
Ports and protocols
Ports and protocolsPorts and protocols
Ports and protocols
 
Select and poll functions
Select and poll functionsSelect and poll functions
Select and poll functions
 
Network Traffic Search using Apache HBase
Network Traffic Search using Apache HBaseNetwork Traffic Search using Apache HBase
Network Traffic Search using Apache HBase
 
Java socket programming
Java socket programmingJava socket programming
Java socket programming
 
20 common port numbers and their purposes
20 common port numbers and their purposes 20 common port numbers and their purposes
20 common port numbers and their purposes
 

Semelhante a Client server

Socket programming using C
Socket programming using CSocket programming using C
Socket programming using CAjit Nayak
 
Network Programming-Python-13-8-2023.pptx
Network Programming-Python-13-8-2023.pptxNetwork Programming-Python-13-8-2023.pptx
Network Programming-Python-13-8-2023.pptxssuser23035c
 
IRJET - Overview of Hole Punching: ICMP Hole Punching, TCP Hole Punching, UDP...
IRJET - Overview of Hole Punching: ICMP Hole Punching, TCP Hole Punching, UDP...IRJET - Overview of Hole Punching: ICMP Hole Punching, TCP Hole Punching, UDP...
IRJET - Overview of Hole Punching: ICMP Hole Punching, TCP Hole Punching, UDP...IRJET Journal
 
Network Prog.ppt
Network Prog.pptNetwork Prog.ppt
Network Prog.pptEloOgardo
 
Bt0076, tcp ip
Bt0076, tcp ipBt0076, tcp ip
Bt0076, tcp ipsmumbahelp
 
Bt0076, tcp ip
Bt0076, tcp ipBt0076, tcp ip
Bt0076, tcp ipsmumbahelp
 
IRJET- Overview of Hole Punching: ICMP Hole Punching, TCP Hole Punching, UDP ...
IRJET- Overview of Hole Punching: ICMP Hole Punching, TCP Hole Punching, UDP ...IRJET- Overview of Hole Punching: ICMP Hole Punching, TCP Hole Punching, UDP ...
IRJET- Overview of Hole Punching: ICMP Hole Punching, TCP Hole Punching, UDP ...IRJET Journal
 
Socket Programming
Socket ProgrammingSocket Programming
Socket ProgrammingCEC Landran
 
اسلاید اول جلسه یازدهم کلاس پایتون برای هکرهای قانونی
اسلاید اول جلسه یازدهم کلاس پایتون برای هکرهای قانونیاسلاید اول جلسه یازدهم کلاس پایتون برای هکرهای قانونی
اسلاید اول جلسه یازدهم کلاس پایتون برای هکرهای قانونیMohammad Reza Kamalifard
 
Networking.pptx
Networking.pptxNetworking.pptx
Networking.pptxEsubesisay
 
acn-practical_manual-19-20-1 final.pdf
acn-practical_manual-19-20-1 final.pdfacn-practical_manual-19-20-1 final.pdf
acn-practical_manual-19-20-1 final.pdfQual4
 
Microsoft Offical Course 20410C_05
Microsoft Offical Course 20410C_05Microsoft Offical Course 20410C_05
Microsoft Offical Course 20410C_05gameaxt
 
Java_Socket_Programming (2).ppt
Java_Socket_Programming (2).pptJava_Socket_Programming (2).ppt
Java_Socket_Programming (2).pptssuserec53e73
 
Computer Networking: A Top-Down Approach
Computer Networking: A Top-Down Approach Computer Networking: A Top-Down Approach
Computer Networking: A Top-Down Approach PolRobinson
 

Semelhante a Client server (20)

Socket programming using C
Socket programming using CSocket programming using C
Socket programming using C
 
Network Programming-Python-13-8-2023.pptx
Network Programming-Python-13-8-2023.pptxNetwork Programming-Python-13-8-2023.pptx
Network Programming-Python-13-8-2023.pptx
 
Net Programming.ppt
Net Programming.pptNet Programming.ppt
Net Programming.ppt
 
IRJET - Overview of Hole Punching: ICMP Hole Punching, TCP Hole Punching, UDP...
IRJET - Overview of Hole Punching: ICMP Hole Punching, TCP Hole Punching, UDP...IRJET - Overview of Hole Punching: ICMP Hole Punching, TCP Hole Punching, UDP...
IRJET - Overview of Hole Punching: ICMP Hole Punching, TCP Hole Punching, UDP...
 
Network Prog.ppt
Network Prog.pptNetwork Prog.ppt
Network Prog.ppt
 
Bt0076, tcp ip
Bt0076, tcp ipBt0076, tcp ip
Bt0076, tcp ip
 
Bt0076, tcp ip
Bt0076, tcp ipBt0076, tcp ip
Bt0076, tcp ip
 
IRJET- Overview of Hole Punching: ICMP Hole Punching, TCP Hole Punching, UDP ...
IRJET- Overview of Hole Punching: ICMP Hole Punching, TCP Hole Punching, UDP ...IRJET- Overview of Hole Punching: ICMP Hole Punching, TCP Hole Punching, UDP ...
IRJET- Overview of Hole Punching: ICMP Hole Punching, TCP Hole Punching, UDP ...
 
03 sockets
03 sockets03 sockets
03 sockets
 
Socket Programming
Socket ProgrammingSocket Programming
Socket Programming
 
Lecture9
Lecture9Lecture9
Lecture9
 
اسلاید اول جلسه یازدهم کلاس پایتون برای هکرهای قانونی
اسلاید اول جلسه یازدهم کلاس پایتون برای هکرهای قانونیاسلاید اول جلسه یازدهم کلاس پایتون برای هکرهای قانونی
اسلاید اول جلسه یازدهم کلاس پایتون برای هکرهای قانونی
 
Networking.pptx
Networking.pptxNetworking.pptx
Networking.pptx
 
Np unit2
Np unit2Np unit2
Np unit2
 
acn-practical_manual-19-20-1 final.pdf
acn-practical_manual-19-20-1 final.pdfacn-practical_manual-19-20-1 final.pdf
acn-practical_manual-19-20-1 final.pdf
 
Introduction to TCP/IP
Introduction to TCP/IPIntroduction to TCP/IP
Introduction to TCP/IP
 
Microsoft Offical Course 20410C_05
Microsoft Offical Course 20410C_05Microsoft Offical Course 20410C_05
Microsoft Offical Course 20410C_05
 
Java_Socket_Programming (2).ppt
Java_Socket_Programming (2).pptJava_Socket_Programming (2).ppt
Java_Socket_Programming (2).ppt
 
Lecture set 7
Lecture set 7Lecture set 7
Lecture set 7
 
Computer Networking: A Top-Down Approach
Computer Networking: A Top-Down Approach Computer Networking: A Top-Down Approach
Computer Networking: A Top-Down Approach
 

Último

RBS学位证,鹿特丹商学院毕业证书1:1制作
RBS学位证,鹿特丹商学院毕业证书1:1制作RBS学位证,鹿特丹商学院毕业证书1:1制作
RBS学位证,鹿特丹商学院毕业证书1:1制作f3774p8b
 
NO1 Certified Black Magic Specialist Expert In Bahawalpur, Sargodha, Sialkot,...
NO1 Certified Black Magic Specialist Expert In Bahawalpur, Sargodha, Sialkot,...NO1 Certified Black Magic Specialist Expert In Bahawalpur, Sargodha, Sialkot,...
NO1 Certified Black Magic Specialist Expert In Bahawalpur, Sargodha, Sialkot,...Amil Baba Dawood bangali
 
1:1原版定制美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree
1:1原版定制美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree1:1原版定制美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree
1:1原版定制美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degreeyuu sss
 
Erfurt FH学位证,埃尔福特应用技术大学毕业证书1:1制作
Erfurt FH学位证,埃尔福特应用技术大学毕业证书1:1制作Erfurt FH学位证,埃尔福特应用技术大学毕业证书1:1制作
Erfurt FH学位证,埃尔福特应用技术大学毕业证书1:1制作f3774p8b
 
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCR
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCRReal Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCR
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCRdollysharma2066
 
原版1:1复刻斯坦福大学毕业证Stanford毕业证留信学历认证
原版1:1复刻斯坦福大学毕业证Stanford毕业证留信学历认证原版1:1复刻斯坦福大学毕业证Stanford毕业证留信学历认证
原版1:1复刻斯坦福大学毕业证Stanford毕业证留信学历认证gwhohjj
 
Hifi Babe North Delhi Call Girl Service Fun Tonight
Hifi Babe North Delhi Call Girl Service Fun TonightHifi Babe North Delhi Call Girl Service Fun Tonight
Hifi Babe North Delhi Call Girl Service Fun TonightKomal Khan
 
NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...
NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...
NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...Amil baba
 
Dubai Call Girls O525547819 Spring Break Fast Call Girls Dubai
Dubai Call Girls O525547819 Spring Break Fast Call Girls DubaiDubai Call Girls O525547819 Spring Break Fast Call Girls Dubai
Dubai Call Girls O525547819 Spring Break Fast Call Girls Dubaikojalkojal131
 
NO1 Certified Vashikaran Specialist in Uk Black Magic Specialist in Uk Black ...
NO1 Certified Vashikaran Specialist in Uk Black Magic Specialist in Uk Black ...NO1 Certified Vashikaran Specialist in Uk Black Magic Specialist in Uk Black ...
NO1 Certified Vashikaran Specialist in Uk Black Magic Specialist in Uk Black ...Amil baba
 
专业一比一美国旧金山艺术学院毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国旧金山艺术学院毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree专业一比一美国旧金山艺术学院毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国旧金山艺术学院毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degreeyuu sss
 
萨斯喀彻温大学毕业证学位证成绩单-购买流程
萨斯喀彻温大学毕业证学位证成绩单-购买流程萨斯喀彻温大学毕业证学位证成绩单-购买流程
萨斯喀彻温大学毕业证学位证成绩单-购买流程1k98h0e1
 
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degreeyuu sss
 
美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作
美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作
美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作ss846v0c
 
5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)
5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)
5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)861c7ca49a02
 
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...ttt fff
 
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best ServicesVip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Servicesnajka9823
 
the cOMPUTER SYSTEM - computer hardware servicing.pptx
the cOMPUTER SYSTEM - computer hardware servicing.pptxthe cOMPUTER SYSTEM - computer hardware servicing.pptx
the cOMPUTER SYSTEM - computer hardware servicing.pptxLeaMaePahinagGarciaV
 
办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一
办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一
办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一diploma 1
 

Último (20)

RBS学位证,鹿特丹商学院毕业证书1:1制作
RBS学位证,鹿特丹商学院毕业证书1:1制作RBS学位证,鹿特丹商学院毕业证书1:1制作
RBS学位证,鹿特丹商学院毕业证书1:1制作
 
NO1 Certified Black Magic Specialist Expert In Bahawalpur, Sargodha, Sialkot,...
NO1 Certified Black Magic Specialist Expert In Bahawalpur, Sargodha, Sialkot,...NO1 Certified Black Magic Specialist Expert In Bahawalpur, Sargodha, Sialkot,...
NO1 Certified Black Magic Specialist Expert In Bahawalpur, Sargodha, Sialkot,...
 
1:1原版定制美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree
1:1原版定制美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree1:1原版定制美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree
1:1原版定制美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree
 
Erfurt FH学位证,埃尔福特应用技术大学毕业证书1:1制作
Erfurt FH学位证,埃尔福特应用技术大学毕业证书1:1制作Erfurt FH学位证,埃尔福特应用技术大学毕业证书1:1制作
Erfurt FH学位证,埃尔福特应用技术大学毕业证书1:1制作
 
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCR
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCRReal Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCR
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCR
 
原版1:1复刻斯坦福大学毕业证Stanford毕业证留信学历认证
原版1:1复刻斯坦福大学毕业证Stanford毕业证留信学历认证原版1:1复刻斯坦福大学毕业证Stanford毕业证留信学历认证
原版1:1复刻斯坦福大学毕业证Stanford毕业证留信学历认证
 
Hifi Babe North Delhi Call Girl Service Fun Tonight
Hifi Babe North Delhi Call Girl Service Fun TonightHifi Babe North Delhi Call Girl Service Fun Tonight
Hifi Babe North Delhi Call Girl Service Fun Tonight
 
NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...
NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...
NO1 Qualified Best Black Magic Specialist Near Me Spiritual Healer Powerful L...
 
Dubai Call Girls O525547819 Spring Break Fast Call Girls Dubai
Dubai Call Girls O525547819 Spring Break Fast Call Girls DubaiDubai Call Girls O525547819 Spring Break Fast Call Girls Dubai
Dubai Call Girls O525547819 Spring Break Fast Call Girls Dubai
 
NO1 Certified Vashikaran Specialist in Uk Black Magic Specialist in Uk Black ...
NO1 Certified Vashikaran Specialist in Uk Black Magic Specialist in Uk Black ...NO1 Certified Vashikaran Specialist in Uk Black Magic Specialist in Uk Black ...
NO1 Certified Vashikaran Specialist in Uk Black Magic Specialist in Uk Black ...
 
young call girls in Gtb Nagar,🔝 9953056974 🔝 escort Service
young call girls in Gtb Nagar,🔝 9953056974 🔝 escort Serviceyoung call girls in Gtb Nagar,🔝 9953056974 🔝 escort Service
young call girls in Gtb Nagar,🔝 9953056974 🔝 escort Service
 
专业一比一美国旧金山艺术学院毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国旧金山艺术学院毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree专业一比一美国旧金山艺术学院毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国旧金山艺术学院毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
 
萨斯喀彻温大学毕业证学位证成绩单-购买流程
萨斯喀彻温大学毕业证学位证成绩单-购买流程萨斯喀彻温大学毕业证学位证成绩单-购买流程
萨斯喀彻温大学毕业证学位证成绩单-购买流程
 
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国加州州立大学东湾分校毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
 
美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作
美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作
美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作
 
5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)
5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)
5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)
 
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...
 
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best ServicesVip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Services
 
the cOMPUTER SYSTEM - computer hardware servicing.pptx
the cOMPUTER SYSTEM - computer hardware servicing.pptxthe cOMPUTER SYSTEM - computer hardware servicing.pptx
the cOMPUTER SYSTEM - computer hardware servicing.pptx
 
办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一
办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一
办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一
 

Client server

  • 1. Netprog 2002 - Client/Server Issues1 Issues in Client/ServerIssues in Client/Server ProgrammingProgramming Refs: Chapter 27Refs: Chapter 27
  • 2. Netprog 2002 - Client/Server Issues2 Issues in Client ProgrammingIssues in Client Programming Identifying the Server.Identifying the Server. Looking up a IP address.Looking up a IP address. Looking up a well known portLooking up a well known port name.name. Specifying a local IP address.Specifying a local IP address. UDP client design.UDP client design. TCP client design.TCP client design.
  • 3. Netprog 2002 - Client/Server Issues3 Identifying the ServerIdentifying the Server Options:Options: – hard-coded into the client program.hard-coded into the client program. – require that the user identify the server.require that the user identify the server. – read from a configuration file.read from a configuration file. – use a separate protocol/network service touse a separate protocol/network service to lookup the identity of the server.lookup the identity of the server.
  • 4. Netprog 2002 - Client/Server Issues4 Identifying a TCP/IP server.Identifying a TCP/IP server. Need an IP address, protocol and port.Need an IP address, protocol and port. – We often useWe often use host nameshost names instead of IPinstead of IP addresses.addresses. – usually the protocol (UDP vs. TCP) is notusually the protocol (UDP vs. TCP) is not specified by the user.specified by the user. – often the port is not specified by the user.often the port is not specified by the user. Can you name one common exception ?Can you name one common exception ?
  • 5. Netprog 2002 - Client/Server Issues5 Services and PortsServices and Ports Many services are available via “wellMany services are available via “well known” addresses (names).known” addresses (names). There is a mapping of service names toThere is a mapping of service names to port numbers:port numbers: struct *servent getservbyname(struct *servent getservbyname( char *service, char *protocol );char *service, char *protocol ); servent->s_portservent->s_port is the port numberis the port number in network byte order.in network byte order.
  • 6. Netprog 2002 - Client/Server Issues6 Specifying a Local AddressSpecifying a Local Address When a client creates and binds aWhen a client creates and binds a socket it must specify a local port andsocket it must specify a local port and IP address.IP address. Typically a client doesn’t care what portTypically a client doesn’t care what port it is on:it is on: haddr->port = htons(0);haddr->port = htons(0); give me any available port !give me any available port !
  • 7. Netprog 2002 - Client/Server Issues7 Local IP addressLocal IP address A client can also ask the operating systemA client can also ask the operating system to take care of specifying the local IPto take care of specifying the local IP address:address: haddr->sin_addr.s_addr=haddr->sin_addr.s_addr= htonl(INADDR_ANY);htonl(INADDR_ANY); Give me the appropriate addressGive me the appropriate address
  • 8. Netprog 2002 - Client/Server Issues8 UDP Client DesignUDP Client Design Establish server address (IP and port).Establish server address (IP and port). Allocate a socket.Allocate a socket. Specify that any valid local port and IPSpecify that any valid local port and IP address can be used.address can be used. Communicate with server (send, recv)Communicate with server (send, recv) Close the socket.Close the socket.
  • 9. Netprog 2002 - Client/Server Issues9 Connected mode UDPConnected mode UDP A UDP client can call connect() toA UDP client can call connect() to establishestablish the address of the server.the address of the server. The UDP client can then use read() andThe UDP client can then use read() and write() or send() and recv().write() or send() and recv(). A UDP client using a connected modeA UDP client using a connected mode socket can only talk to one serversocket can only talk to one server (using the connected-mode socket).(using the connected-mode socket).
  • 10. Netprog 2002 - Client/Server Issues10 TCP Client DesignTCP Client Design Establish server address (IP and port).Establish server address (IP and port). Allocate a socket.Allocate a socket. Specify that any valid local port and IPSpecify that any valid local port and IP address can be used.address can be used. Call connect()Call connect() Communicate with server (read,write).Communicate with server (read,write). Close the connection.Close the connection.
  • 11. Netprog 2002 - Client/Server Issues11 Closing a TCP socketClosing a TCP socket Many TCP based application protocolsMany TCP based application protocols support multiple requests and/orsupport multiple requests and/or variable length requests over a singlevariable length requests over a single TCP connection.TCP connection. How does the server known when theHow does the server known when the client is done (and it is OK to close theclient is done (and it is OK to close the socket) ?socket) ?
  • 12. Netprog 2002 - Client/Server Issues12 Partial ClosePartial Close One solution is for the client to shutOne solution is for the client to shut down only it’s writing end of the socket.down only it’s writing end of the socket. TheThe shutdown() system call providessystem call provides this function.this function. shutdown( int s, int direction);shutdown( int s, int direction); – direction can be 0 to close the reading enddirection can be 0 to close the reading end or 1 to close the writing end.or 1 to close the writing end. – shutdown sends info to the other process!shutdown sends info to the other process!
  • 13. Netprog 2002 - Client/Server Issues13 TCP sockets programmingTCP sockets programming Common problem areas:Common problem areas: – null termination of strings.null termination of strings. – reads don’t correspond to writes.reads don’t correspond to writes. – synchronization (including close()).synchronization (including close()). – ambiguous protocol.ambiguous protocol.
  • 14. Netprog 2002 - Client/Server Issues14 TCP ReadsTCP Reads Each call to read() on a TCP socketEach call to read() on a TCP socket returns any available data (up to areturns any available data (up to a maximum).maximum). TCP buffers data at both ends of theTCP buffers data at both ends of the connection.connection. You must be prepared to accept data 1You must be prepared to accept data 1 byte at a time from a TCP socket!byte at a time from a TCP socket!
  • 15. Netprog 2002 - Client/Server Issues15 Server DesignServer Design IterativeIterative ConnectionlessConnectionless IterativeIterative Connection-OrientedConnection-Oriented ConcurrentConcurrent Connection-OrientedConnection-Oriented ConcurrentConcurrent ConnectionlessConnectionless
  • 16. Netprog 2002 - Client/Server Issues16 Concurrent vs. IterativeConcurrent vs. Iterative Iterative Small, fixed size requests Easy to program Iterative Small, fixed size requests Easy to program Concurrent Large or variable size requests Harder to program Typically uses more system resources Concurrent Large or variable size requests Harder to program Typically uses more system resources
  • 17. Netprog 2002 - Client/Server Issues17 Connectionless vs.Connectionless vs. Connection-OrientedConnection-Oriented Connection-Oriented EASY TO PROGRAM transport protocol handles the tough stuff. requires separate socket for each connection. Connection-Oriented EASY TO PROGRAM transport protocol handles the tough stuff. requires separate socket for each connection. Connectionless less overhead no limitation on number of clients Connectionless less overhead no limitation on number of clients
  • 18. Netprog 2002 - Client/Server Issues18 StatelessnessStatelessness State:State: Information that a serverInformation that a server maintains about the status of ongoingmaintains about the status of ongoing client interactions.client interactions. Connectionless servers that keep stateConnectionless servers that keep state information must be designed carefully!information must be designed carefully! Messages can be duplicated!Messages can be duplicated!
  • 19. Netprog 2002 - Client/Server Issues19 The Dangers of StatefullnessThe Dangers of Statefullness Clients can go down at any time.Clients can go down at any time. Client hosts can reboot many times.Client hosts can reboot many times. The network can lose messages.The network can lose messages. The network can duplicate messages.The network can duplicate messages.
  • 20. Netprog 2002 - Client/Server Issues20 Concurrent ServerConcurrent Server Design AlternativesDesign Alternatives One child per clientOne child per client Spawn one thread per clientSpawn one thread per client Preforking multiple processesPreforking multiple processes Prethreaded ServerPrethreaded Server
  • 21. Netprog 2002 - Client/Server Issues21 One child per clientOne child per client Traditional Unix server:Traditional Unix server: – TCP: after call toTCP: after call to accept(),accept(), callcall fork().fork(). – UDP: afterUDP: after recvfrom(),recvfrom(), callcall fork().fork(). – Each process needs only a few sockets.Each process needs only a few sockets. – Small requests can be serviced in a smallSmall requests can be serviced in a small amount of time.amount of time. Parent process needs to clean up afterParent process needs to clean up after children!!!! (callchildren!!!! (call wait()wait() ).).
  • 22. Netprog 2002 - Client/Server Issues22 One thread per clientOne thread per client Almost like using fork - callAlmost like using fork - call pthread_create instead.pthread_create instead. Using threads makes it easier (lessUsing threads makes it easier (less overhead) to have sibling processesoverhead) to have sibling processes share information.share information. Sharing information must be doneSharing information must be done carefully (use pthread_mutex)carefully (use pthread_mutex)
  • 23. Netprog 2002 - Client/Server Issues23 PrePrefork()fork()’d Server’d Server Creating a new process for each clientCreating a new process for each client is expensive.is expensive. We can create a bunch of processes,We can create a bunch of processes, each of which can take care of a client.each of which can take care of a client. Each child process is an iterativeEach child process is an iterative server.server.
  • 24. Netprog 2002 - Client/Server Issues24 PrePrefork()fork()’d TCP Server’d TCP Server Initial process creates socket and bindsInitial process creates socket and binds to well known address.to well known address. Process now callsProcess now calls fork()fork() a bunch ofa bunch of times.times. All children callAll children call accept().accept(). The next incoming connection will beThe next incoming connection will be handed to one child.handed to one child.
  • 25. Netprog 2002 - Client/Server Issues25 PreforkingPreforking As the book shows, having too manyAs the book shows, having too many preforked children can be bad.preforked children can be bad. Using dynamic process allocationUsing dynamic process allocation instead of a hard-coded number ofinstead of a hard-coded number of children can avoid problems.children can avoid problems. The parent process just manages theThe parent process just manages the children, doesn’t worry about clients.children, doesn’t worry about clients.
  • 26. Netprog 2002 - Client/Server Issues26 Sockets library vs. system callSockets library vs. system call A preforked TCP server won’t usuallyA preforked TCP server won’t usually work the way we want ifwork the way we want if socketssockets is notis not part of the kernel:part of the kernel: – calling accept() is a library call, not ancalling accept() is a library call, not an atomic operation.atomic operation. We can get around this by making sureWe can get around this by making sure only one child calls accept() at a timeonly one child calls accept() at a time using some locking scheme.using some locking scheme.
  • 27. Netprog 2002 - Client/Server Issues27 Prethreaded ServerPrethreaded Server Same benefits as preforking.Same benefits as preforking. Can also have the main thread do allCan also have the main thread do all the calls to accept() and hand off eachthe calls to accept() and hand off each client to an existing thread.client to an existing thread.
  • 28. Netprog 2002 - Client/Server Issues28 What’s the best server designWhat’s the best server design for my application?for my application? Many factors:Many factors: – expected number of simultaneous clients.expected number of simultaneous clients. – Transaction size (time to compute orTransaction size (time to compute or lookup the answer)lookup the answer) – Variability in transaction size.Variability in transaction size. – Available system resources (perhaps whatAvailable system resources (perhaps what resources can be required in order to runresources can be required in order to run the service).the service).
  • 29. Netprog 2002 - Client/Server Issues29 Server DesignServer Design It is important to understand the issuesIt is important to understand the issues and options.and options. Knowledge of queuing theory can be aKnowledge of queuing theory can be a big help.big help. You might need to test a fewYou might need to test a few alternatives to determine the bestalternatives to determine the best design.design.