Skip to content

Instantly share code, notes, and snippets.

View vchimishuk's full-sized avatar
🏠
Working from home

Viacheslav Chimishuk vchimishuk

🏠
Working from home
  • Ukraine, Khmelnitsky
  • 19:52 (UTC +03:00)
View GitHub Profile
+--------+ +---------+
| | em1:192.168.1.1 192.168.1.10 | |
| =------------------------------------= client1 |
| | em2:192.168.2.1 | |
= router =-------------------+ +---------+
| | |
| =-------------- | +---------+
| | | 192.168.2.10 | |
+--------+ +----------------= client2 |
| |
d8:announce41:http://bt3.rutracker.cx/ann?kk=gdo31J7EEG13:announce-listll41:http://bt3.rutracker.cx/ann?kk=gdo31J7EEGel31:http://retracker.local/announceee7:comment51:https://rutracker.org/forum/viewtopic.php?t=546239810:created by18:torrenttools/0.6.213:creation datei1725182398e4:infod16:cross_seed_entry32:45b032c40d1e8f392197dc7c46965e615:filesld6:lengthi6951978e4:pathl18:MyHomeLib 2.3.3.7zeed6:lengthi13238638e4:pathl14:converters.rareed6:lengthi6116007e4:pathl23:d.fb2-009373-367300.zipeed6:lengthi401439401e4:pathl23:d.fb2-172703-173908.zipeed6:lengthi1084557442e4:pathl23:f.fb2-173909-177717.zipeed6:lengthi1729627102e4:pathl23:f.fb2-177718-183065.zipeed6:lengthi226193030e4:pathl23:f.fb2-183066-183652.zipeed6:lengthi660914832e4:pathl23:f.fb2-183654-185837.zipeed6:lengthi901643185e4:pathl23:f.fb2-185838-188548.zipeed6:lengthi784043944e4:pathl23:f.fb2-188549-190927.zipeed6:lengthi864595267e4:pathl23:f.fb2-190928-193388.zipeed6:lengthi653265101e4:pathl23:f.fb2-193389-195730.zipeed6:lengthi974721626e4:pathl23:f.
During my career (15 years) I've had experience working in small companies and in industry leaders, working with small projects and big products with wide infrastructure, building brand new products from the ground and supporting existing ones. My main programming stack is Java but I can work with some other languages and technologies such as Go, Python, JavaScript, Bash, C.
My main experience and specialization is highload Java backend appications.
I am a long-time GNU/Linux user who has system administration experience and can support production machines (DevOps role).
I have Computer Science degree.
Some other keywords: Spring, SpringBoot, Guice, RestEasy, AsyncHTTPClient, Kafka, JDBC, JPA, JMS, MySQL, Postgresql, MongoDB, ElasticSearch, Aerospike, Druid, Linux, Python, Django, Flask, Go, Golang, Networking, HTTP, REST, Bash, Spock, C, Jenkins, TeamCity, Docker, AWS, S3, Kinesis, Athena, Hive, Apache Airflow, Protobuf, Avro, Nginx, HaProxy, HazelCast.
@vchimishuk
vchimishuk / jvm-tcp-rst.c
Last active April 8, 2023 21:26
JVM TCP RST
/* # curl can be used in the role of client.
* $ curl http://localhost:9090
* curl: (56) Recv failure: Connection reset by peer
*
* Details.
* * JDK11 uses close() to close socket. close() sends RST packet if read queue is not empty.
* https://github.com/openjdk/jdk/blob/jdk-11%2B28/src/java.base/unix/native/libnet/PlainSocketImpl.c#L791
* https://github.com/openjdk/jdk/blob/jdk-11%2B28/src/java.base/linux/native/libnet/linux_close.c#L342
* https://github.com/openjdk/jdk/blob/jdk-11%2B28/src/java.base/linux/native/libnet/linux_close.c#L294
*
@vchimishuk
vchimishuk / kafka-cheat-sheet.md
Created May 14, 2019 17:09 — forked from ursuad/kafka-cheat-sheet.md
Quick command reference for Apache Kafka

Kafka Topics

List existing topics

bin/kafka-topics.sh --zookeeper localhost:2181 --list

Describe a topic

bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic

Purge a topic

bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000

... wait a minute ...

--- rules 2017-02-11 22:00:57.000000000 +0100
+++ /home/vchimishuk/nginx-build/nginx-1.10.3/debian/rules 2018-09-28 17:26:47.041698014 +0200
@@ -80,7 +80,8 @@
--without-http_ssi_module \
--without-http_userid_module \
--without-http_uwsgi_module \
- --add-module=$(MODULESDIR)/nginx-echo
+ --add-module=$(MODULESDIR)/nginx-echo \
+ --add-module=$(MODULESDIR)/graphite-nginx-module
@vchimishuk
vchimishuk / nginx-tuning.md
Created September 27, 2018 13:36 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@vchimishuk
vchimishuk / PostgreSQL_index_naming.rst
Created February 15, 2018 11:45 — forked from popravich/PostgreSQL_index_naming.rst
PostgreSQL index naming convention to remember

The standard names for indexes in PostgreSQL are:

{tablename}_{columnname(s)}_{suffix}

where the suffix is one of the following:

  • pkey for a Primary Key constraint;
  • key for a Unique constraint;
  • excl for an Exclusion constraint;
  • idx for any other kind of index;
package com.geomotiv.ads.benchmarks;
import java.util.ArrayDeque;
import java.util.LinkedList;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.RunnerException;
import org.openjdk.jmh.runner.options.Options;
// Main configuration in src/main/java
@Configuration
public class MainConfig {
@Bean
@Profile("default")
public Ticker ticker() { return new Ticker(); }
@Bean
public Foo foo(Ticker ticker) { return new Foo(ticker); } // 1.
}