4 ms·
If query is just to produce output for use in app, then #1 & #2 could be done using webscraping techniques/methods.[0] aka hash the query and assign the output
by sargstuff 4y ago
If query is just to produce output for use in app, then #1 & #2 could be done using webscraping techniques/methods.[0]
aka hash the query and assign the output of the query to blob in database
(or file with hash query id & just use script & netcat/socat to dump file to connection)
#3 is going to depend on available resources to 'fake' the server.
Using external box as server, can just hash query to get query id. Then dump what's associated with that id from database setup discussed above.
For network delays, ebpf / firewall rate limiting rules for application.connection are one approach. Alternate python/tokio examples.[1][2]
[0] simple webscraping : https://crates.io/crates/websocat https://crates.io/crates/websocat
[1] https://stackoverflow.com/questions/52680888/tcp-python-socket-server-with-delay-on-http-client https://stackoverflow.com/questions/52680888/tcp-python-sock...
[2] tokio : https://www.youtube.com/watch?v=DJzgUmH30h8 https://www.youtube.com/watch?v=DJzgUmH30h8