Seda an architecture for well conditioned scalable internet services
Download
1 / 16

SEDA: An Architecture for Well-Conditioned, Scalable Internet Services - PowerPoint PPT Presentation


  • 118 Views
  • Uploaded on

SEDA: An Architecture for Well-Conditioned, Scalable Internet Services. Matt Welsh, David Culler, and Eric Brewer Computer Science Division University of California, Berkley Presented By Oindrila Mukherjee. Agenda. What is SEDA ? Why SEDA ? Thread-based Concurrency

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' SEDA: An Architecture for Well-Conditioned, Scalable Internet Services' - dwayne


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Seda an architecture for well conditioned scalable internet services

SEDA: An Architecture for Well-Conditioned, Scalable Internet Services

Matt Welsh, David Culler, and Eric Brewer

Computer Science Division

University of California, Berkley

Presented By

Oindrila Mukherjee


Agenda
Agenda Internet Services

  • What is SEDA ?

  • Why SEDA ?

  • Thread-based Concurrency

  • Event-driven Concurrency

  • SEDA

    • Goals

    • Stages

    • Applications

    • Dynamic Resource Controllers

  • Implement SEDA concepts using existing OS primitives

    • Asynchronous Socket I/O

    • Asynchronous File I/O

  • Conclusion


What is seda
What is SEDA ? Internet Services

  • SEDA – Staged Event-Driven Architecture

  • Enables high concurrency and load conditioning

  • Simplifies construction of well conditioned services

  • Combines threads and event-based programs


Why seda
Why SEDA ? Internet Services

  • Internet services must be responsive, robust and always available

  • Service request for dynamic content

  • Fluctuation of load

  • SEDA combines threads and event-based programming models


Thread based concurrency
Thread-Based Concurrency Internet Services

  • Relatively easy to program

  • Associated overheads

    • Cache and TLB misses

    • Scheduling overhead

    • Lock Contention


Thread based concurrency contd
Thread-Based Concurrency (contd.) Internet Services

  • Can be achieved in two ways

    • Unbounded thread allocation

      • Thread-per-task model

      • Eat up memory

      • Too many context switches

    • Bounded thread pools

      • Fixed limit on number of threads allocated

      • Avoids throughput degradation

      • Unfairness to clients

      • Large waiting times


Event driven concurrency
Event-Driven Concurrency Internet Services

  • Smaller number of threads

  • No Context Switches

  • Little degradation in throughput

  • Designing the scheduler – complex

  • Difficult to achieve modularity


Threads vs events
Threads vs. Events Internet Services


SEDA Internet Services

  • Application is a network of stages

  • Stages connected by event queues

  • Uses dynamic resource controllers


Seda goals
SEDA - Goals Internet Services

  • Support massive concurrency

  • Simplify the construction of well-conditioned services

  • Enable Introspection

  • Support self-tuning resource management


Seda stages
SEDA - Stages Internet Services

  • Event Handler – provides logic of the stage

  • Incoming Event Queue – queues events processed by the event handler for that stage

  • Thread Pool – for dynamic allocation of threads

  • Controller – manages the stage, affects scheduling and thread allocation


Seda applications
SEDA - Applications Internet Services

  • A network of stages

  • Queue decouples execution amongst stages

    • Independent load management

  • Improves debugging and performance analysis


Seda dynamic resource controllers
SEDA - Dynamic Resource Controllers Internet Services

  • Thread Pool Controller

    • Avoids allocating too many threads

    • Queue length > threshold, controller adds a thread

    • Threads idle, controller removes thread


Seda dynamic resource controllers contd
SEDA - Dynamic Resource Controllers (contd.) Internet Services

  • Batching Controller

    • Adjusts number of events processed by each invocation of the event handler within a stage

    • Observes output rate of events

    • Decreases batching factor until throughput begins to degrade


Asynchronous i o primitives
Asynchronous I/O Primitives Internet Services

  • Asynchronous Socket I/O

    • Provides a non-blocking sockets interface for services

    • Outperforms the thread-based compatibility layer

  • Asynchronous File I/O

    • Implemented by using blocking I/O and a bounded thread pool

    • One thread processes events for a particular file at a time


Conclusion
Conclusion Internet Services

  • Internet services experience huge variations in service load

    • Slashdot Effect

  • Resources must be utilized to make best use of them

    • Dynamic allocation of resources enables this

  • SEDA uses dynamic controllers for resource management and scheduling of each stage

  • SEDA isolates threads within each stage and uses event-driven design to maximize throughput at high load


ad