Resources Utilization in Reactive Services

Resources Utilization in Reactive Services

http://ift.tt/2rfeKR6

Let me start this post with a question. Imagine that a service returning a value who’s fetching from another service (e.g. database) takes one second (for sake of the example, let’s assume it always takes 1 second):

@SpringBootApplication
@RestController
public class WebApplication {

    public static void main(String[] args) {
        SpringApplication.run(WebApplication.class, args);
    }

    @GetMapping("/value")
    String fetchValue() throws InterruptedException {
        TimeUnit.SECONDS.sleep(1);
        return "42";
    }
}

How many transactions per second can we get when we hit this service with 10 concurrent users?

java

via DZone.com Feed https://dzone.com

May 17, 2017 at 03:09PM

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s