TheHingineer

 Connection-Oriented and Connectionless Services 

 Network Services kya hote hain?

Network mein services ka matlab hota hai ki ek layer dusri layer ko kaise data bhejne ka tareeka deti hai.

Network mein mainly 2 types ke services hote hain:

  1. Connection-Oriented Service

  2. Connectionless Service

Chaliye dono ko easy language mein samajhte hain.

 1. Connection-Oriented Service

 Definition:

Connection-Oriented service mein pehle connection banaya jata hai, phir data bheja jata hai, aur baad mein connection close kiya jata hai.

Example: Phone call — pehle number dial karte ho, samne wala uthata hai, fir baat hoti hai, aur phir disconnect.

 Features:

  • Pehle connection establish hota hai

  • Data sahi order mein pahuchta hai

  • Reliable hota hai — galti hone par data fir se bhej diya jata hai

  • Thoda slow hota hai kyunki setup time lagta hai

 Example:

  • TCP (Transmission Control Protocol) connection-oriented service deta hai

 Diagram:

Sender                Receiver
|    Connection Req    |
|--------------------->|
|    Connection Ack    |
|<---------------------|
|    Data Transfer     |
|--------------------->|
|    Acknowledgment    |
|<---------------------|
|   Connection Close   |
|--------------------->|

 2. Connectionless Service

 Definition:

Connectionless service mein bina connection banaye hi data bhej diya jata hai.

Example: Postcard ya SMS — seedha bhej do, koi pehle se poochne ki zarurat nahi.

 Features:

  • No connection setup

  • Fast hota hai

  • Data loss ya out of order ho sakta hai

  • No guarantee ki data sahi se pahucha

 Example:

  • UDP (User Datagram Protocol) connectionless service deta hai

 Diagram:

Sender              Receiver
  |    Data Packet     |
  |------------------->|
  |    Data Packet     |
  |------------------->|
(No acknowledgment, no setup)


 Comparison Table

Feature Connection-Oriented Connectionless
Setup Required Haan Nahi
Reliability High Low
Order of Data Maintain hota hai Nahi hota
Speed Slow Fast
Example Protocol TCP UDP
Use Case File Transfer, Website Video Stream, Online Games

 Real-Life Examples

Service Type Real-Life Example
Connection-Oriented Phone Call, WhatsApp Call
Connectionless Postcard, SMS, YouTube Video

 Summary

  • Connection-Oriented = Reliable, sahi order mein data, lekin slow (e.g. TCP)

  • Connectionless = Fast, simple, lekin data loss ho sakta hai (e.g. UDP)

Aap kis service ka use karenge, ye aapke application pe depend karta hai:

  • Agar data ka correct pahuchna zaruri hai (like bank transaction), toh connection-oriented

  • Agar speed important hai (like live video), toh connectionless

Scroll to Top