Jmeter TCP sampler used for what - tcp

From http://abh1sh3k.blogspot.com/2013/11/simple-tcp-server-and-jmeter-as-client.html, I practiced and it ran well.
I don't understand, what the test (jmeter tcp sampler) is used for? My company usually uses a web application and a process application.
Who can show me any example?

Related

Build an Indy-SDK web demo

I am trying to build a simple Indy-SDK Agent in python with a Web interface on a Ubuntu VPS Server.
https://github.com/hyperledger/indy-sdk/tree/master/samples
I was looking at those samples. Much testing there.
Is there some other source you guys use to build a simple indy demo with some simple DID actions and a wallet?
Thanks in advance.
Indeed, the samples are more or less only for understanding the indy flow and all the stuff around indy.
There are basically 2 things:
Ledger
your application aka indy application
1) Ledger
First thing, you will need to create your private ledger. The best way is to use they script which runs docker containers as peer network with indy servers. Once the servers are up you should be ready to connect your application to indy network.
2) Application
Your application needs to know genesis tx to be able to connect to the ledger. Once your application is connected you can develop your logic. The getting started code should be enough. It covers 2) in the list below and it also creates DIDs for all entities with steward role.
So before doing your specific implementation you should understand and be familiar with:
Indy documentation
Indy getting started diagram - basic indy flow
Watch this demonstration video
So, if you want to create Web Interfaces it should be basically copy&paste from getting-started sample.
Also if you just want to demonstrate what indy can do and you dont have time or resources to build your own application, you can take a look at this demonstration. It's more complex application with Aries and User interfaces but you have web ui with all the stuff.

How to load test Aspnetcore.signalr application?

We need to load test aspnetcore signalR application. I saw about crank but that
seems to help only with aspnet signalR. Can someone help me with this.
Most probably you need a load testing tool which supports WebSocket protocol as this is what SignalR will be doing by default.
It could be also Server Sent Events, Forever Frame or Long Polling so you need to clarify the NFRs and identify which protocols are in scope and what are the requirements which need to be tested.
Depending on your skills you can go for:
Gatling which has support of WebSocket, but you will need to do some programming in Scala
Apache JMeter which supports WebSocket via the plugin, JMeter allows you to create tests using simple GUI. You will be able to also test Long Polling and Server Sent Events using JMeter, check out How to Load Test Async Requests with JMeter for more details.

"Ping" a tensorflow serving server

I implemented several gRPC services, which all share the basic interface which allows me to "ping" them to see if they are up. For that, I have the getServiceVersion() request, which returns me the service version if the service is up, and the request breaks if the service is not up. How would you do this is tf serving? Or is there a better procedure in GRPC in general?
If no other answer comes up, I will just create a ping model which returns the service version from a constant. This would be a prediction model which predicts with 100% accuracy if the predictor is up. :)

HTTP through a domain socket

I'm writing a bit of desktop software which has two components. Component B queries component A. Creating a web service seems like an ideal way to do IPC in principle. The data model fits, there are ready-made client and server libraries, a well known way to encode and decode parameters etc.
But setting up an HTTP server on a network socket doesn't seem right for a local application. For example what port do I choose? I don't really want people to be able to scan and talk to the app from outside etc.
So I was thinking that I might be able to do HTTP over a domain socket. Does that make any sense? Is there any precedence for it? Is there an equivalent protocol that I could use for IPC which has the same properties as HTTP (requests for specified resources (URIs), encoded parameters, response)?
Looking for C libraries (and possibly Go and ObjC for bonus points).
Binding to the loopback interface only (127.0.0.1) solves your "external visibility" problem, only processes on the local machine will be able to connect.
It does not solve your port allocation problem though, the port number you choose might be taken by the time your app starts. Then your server can't bind and your client connects to the other process bound to your port.
Old, less hip, but CORBA implementations tend to have the problems you have not thought of yet figured out already.

Test harness software for networking failures

During integration testing it is important to simulate various kinds of low-level networking failure to ensure that the components involved properly handle them. Some socket connection examples (from the Release It! book by Michael Nygard) include
connection refused
remote end replies with SYN/ACK but never sends any data
remote end sends only RESET packets
connection established, but remote end never acknowledges receiving packets, causing endless retransmissions
and so forth.
It would be useful to simulate such failures for integration testing involving web services, database calls and so forth.
Are there any tools available able to create failure conditions of this specific sort (i.e. socket-level failures)? One possibility, for instance, would be some kind of dysfunctional server that exhibits different kinds of failure on different ports.
EDIT: After some additional research, it looks like it's possible to handle this kind of thing using a firewall. For example iptables has some options that allow you to match packets (either randomly according to some configurable probability or else on an every-nth-packet basis) and then drop them. So I am thinking that we might set up our "nasty server" with the firewall rules configured on a port-by-port basis to create the kind of nastiness we want to test our apps against. Would be interested to hear thoughts about this approach.
bane is built for this purpose, described as:
Bane is a test harness used to test your application's interaction with other servers. It is based upon the material from Michael Nygard's "Release It!" book as described in the "Test Harness" chapter.
(Edit 2021): a more developed tool for testing behavior with different network issues is toxiproxy
Toxiproxy is a framework for simulating network conditions. It's made specifically to work in testing, CI and development environments, supporting deterministic tampering with connections, but with support for randomized chaos and customization. Toxiproxy is the tool you need to prove with tests that your application doesn't have single points of failure.
Take a look at the dummynet.
You can do it with iptables, or you can do it without actually sending the packets anywhere with ns-3, possibly combined with your favourite virtualisation solution, or you can do all sorts of strange things with scapy.

Resources