🔏
Tech
  • 🟢App aspects
    • Software architecture
      • Caching
      • Anti-patterns
      • System X-ability
      • Coupling
      • Event driven architecture
        • Command Query Responsibility Segregation (CQRS)
        • Change Data Capture (CDC)
      • Distributed transactions
      • App dev notes
        • Architecture MVP
      • TEMP. Check list
      • Hexagonal arch
      • Communication
        • REST vs messaging
        • gRPC
        • WebSocket
      • Load balancers
      • Storage limits
      • Event storming
    • Authentication
    • Deployment strategy
  • Databases
    • Classification
    • DB migration tools
    • PostreSQL
    • Decision guidance
    • Index
      • Hash indexes
      • SSTable, LSM-Trees
      • B-Tree
      • Engines, internals
    • Performance
  • System design
    • Interview preparation
      • Plan
        • Instagram
        • Tinder
        • Digital wallet
        • Dropbox
        • Live video streaming
        • Uber
        • Whatsup
        • Tiktok
        • Twitter
        • Proximity service
    • Algorithms
    • Acronyms
  • 🟢Programming languages
    • Java
      • Features
        • Field hiding
        • HashCode() and Equals()
        • Reference types
        • Pass by value
        • Atomic variables
      • Types
      • IO / NIO
        • Java NIO
          • Buffer
          • Channel
        • Java IO: Streams
          • Input streams
            • BufferedInputStream
            • DataInputStream
            • ObjectInputStream
            • FilterInputStream
            • ByteArrayInputStream
        • Java IO: Pipes
        • Java IO: Byte & Char Arrays
        • Java IO: Input Parsing
          • PushbackReader
          • StreamTokenizer
          • LineNumberReader
          • PushbackInputStream
        • System.in, System.out, System.error
        • Java IO: Files
          • FileReader
          • FileWriter
          • FileOutputStream
          • FileInputStream
      • Multithreading
        • Thread liveness
        • False sharing
        • Actor model
        • Singleton
        • Future, CompletableFuture
        • Semaphore
      • Coursera: parallel programming
      • Coursera: concurrent programming
      • Serialization
      • JVM internals
      • Features track
        • Java 8
      • Distributed programming
      • Network
      • Patterns
        • Command
      • Garbage Collectors
        • GC Types
        • How GC works
        • Tools for GC
    • Kotlin
      • Scope functions
      • Inline value classes
      • Coroutines
      • Effective Kotlin
    • Javascript
      • Javascript vs Java
      • TypeScript
    • SQL
      • select for update
    • Python
      • __init.py__
  • OS components
    • Network
      • TCP/IP model
        • IP address in action
      • OSI model
  • 🟢Specifications
    • JAX-RS
    • REST
      • Multi part
  • 🟢Protocols
    • HTTP
    • OAuth 2.0
    • LDAP
    • SAML
  • 🟢Testing
    • Selenium anatomy
    • Testcafe
  • 🟢Tools
    • JDBC
      • Connection pool
    • Gradle
    • vim
    • git
    • IntelliJ Idea
    • Elastic search
    • Docker
    • Terraform
    • CDK
    • Argo CD
      • app-of-app setup
    • OpenTelemetry
    • Prometheus
    • Kafka
      • Consumer lag
  • 🟢CI
    • CircleCi
  • 🟢Platforms
    • AWS
      • VPC
      • EC2
      • RDS
      • S3
      • IAM
      • CloudWatch
      • CloudTrail
      • ELB
      • SNS
      • Route 53
      • CloudFront
      • Athena
      • EKS
    • Kubernetes
      • Networking
      • RBAC
      • Architecture
      • Pod
        • Resources
      • How to try
      • Kubectl
      • Service
      • Tooling
        • ArgoCD
        • Helm
        • Istio
    • GraalVM
    • Node.js
    • Camunda
      • Service tasks
      • Transactions
      • Performance
      • How it executes
  • 🟢Frameworks
    • Hibernate
      • JPA vs Spring Data
    • Micronaut
    • Spring
      • Security
      • JDBC, JPA, Hibernate
      • Transactions
      • Servlet containers, clients
  • 🟢Awesome
    • Нейробиология
    • Backend
      • System design
    • DevOps
    • Data
    • AI
    • Frontend
    • Mobile
    • Testing
    • Mac
    • Books & courses
      • Path: Java Concurrency
    • Algorithms
      • Competitive programming
    • Processes
    • Finance
    • Electronics
  • 🟢Electronics
    • Arduino
    • IoT
  • Artificial intelligence
    • Artificial Intelligence (AI)
  • 🚀Performance
    • BE
  • 📘Computer science
    • Data structures
      • Array
      • String
      • LinkedList
      • Tree
    • Algorithms
      • HowTo algorithms for interview
  • 🕸️Web dev (Frontend)
    • Trends
    • Web (to change)
  • 📈Data science
    • Time series
Powered by GitBook
On this page
  • Servlet containers
  • Clients

Was this helpful?

  1. Frameworks
  2. Spring

Servlet containers, clients

Servlet containers

Servlet Container
Blocking HTTP Requests
Non-Blocking HTTP Requests
WebSockets Support
Works Well with Kotlin Coroutines

Jetty

✅ Yes

✅ Yes (via async I/O)

✅ Yes

✅ Yes (with Coroutine-based APIs)

Tomcat

✅ Yes

✅ Yes (via async servlets)

✅ Yes

⚠️ Limited (needs adapters like ktor-server-tomcat)

Undertow

✅ Yes

✅ Yes (reactive streams)

✅ Yes

✅ Yes (used in ktor-server-undertow)

Netty (is not a servlet container—it's an event-driven network application framework that can be used to build non-blocking servers and clients)

⚠️ Not its primary model

✅ Yes (fully event-driven)

✅ Yes

✅ Yes (integrates well with Ktor and coroutines)

Clients

HTTP Client
Blocking Requests
Non-Blocking Requests
Coroutine Friendly
Additional Notes

RestTemplate

✅ Yes

❌ No

⚠️ Limited

Synchronous API, designed for Spring MVC.

WebClient (Reactor Netty (default in Spring Boot))

⚠️ Limited

✅ Yes

✅ Yes

Non-blocking, reactive web client from Spring WebFlux.

Ktor

✅ Yes

✅ Yes

✅ Yes

Designed for Kotlin; supports both blocking and non-blocking calls.

OkHttp

✅ Yes

✅ Yes

⚠️ Limited

Primarily synchronous but supports asynchronous requests; good for Kotlin coroutines.

Apache HttpClient

✅ Yes

⚠️ Limited

⚠️ Limited

Synchronous by default; can use Future for async.

Retrofit

✅ Yes

✅ Yes

✅ Yes

Works with OkHttp, designed for REST APIs; supports coroutines via extensions.

Vert.x Web Client

❌ No

✅ Yes

✅ Yes

Fully non-blocking and designed for asynchronous programming.

Spring’s WebClient is a non-blocking HTTP client, but it can use different underlying engines for handling HTTP requests.

What determines WebClient's underlying engine?

It depends on which Spring Boot starter you include:

  1. If using spring-boot-starter-webflux (Reactive)

    • WebClient defaults to Netty (via Reactor Netty).

    • Netty handles HTTP connections asynchronously.

  2. If using spring-boot-starter-web (Blocking, Tomcat)

    • WebClient uses Apache HttpClient or Java’s HttpURLConnection.

    • It can still be non-blocking at the application level, but the underlying client might not be fully asynchronous.

      • If you’re making a few HTTP requests per second → You can use a blocking client inside coroutines with Dispatchers.IO

PreviousTransactionsNextНейробиология

Last updated 2 months ago

Was this helpful?

🟢