• Stars
    star
    228
  • Rank 175,267 (Top 4 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created almost 6 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Ultra light service mesh for any orchestrator

netramesh

netramesh

CircleCI

Ultra light service mesh has main goals:

  • high performance
  • observability (Jaeger distributed tracing)
  • simplicity of operation
  • unlimited scalability
  • any infrastructure compatibility
  • transparency

Service mesh netramesh consists of two main parts:

  • Transparent TCP proxy for microservices with original destination retrieval.
  • Init container for network rules configuration (iptables based).

Getting started

Check out examples

Supported application level protocols

  • HTTP/1.1 and lower

Also netra supports any TCP proto traffic (proxies it transparently).

How it works

main parts

To intercept all TCP traffic netra uses iptables redirect rules. After applying them, TCP traffic goes firstly to netra sidecar. Netra sidecar determines original destination using SO_ORIGINAL_DST socket option. After that netra sidecar works in bidirectional stream processing mode and proxies all TCP packets through itself. If app level protocol is HTTP1, netra parses it and sends tracing span.

traffic interception

Injecting

For now netra supports only manual injecting.

Basic configuration (environment variables)

Netra init (network interception settings)

Env name Description
NETRA_SIDECAR_PORT netra sidecar listen port redirect to (defaults to 14956)
NETRA_SIDECAR_USER_ID netra sidecar user id to avoid infinite redirect loops (defaults to 1337)
NETRA_SIDECAR_GROUP_ID netra sidecar group id to avoid infinite redirect loops (defaults to 1337)
INBOUND_INTERCEPT_PORTS inbound ports to intercept (defaults to *, all ports)
OUTBOUND_INTERCEPT_PORTS outbound ports to intercept (defaults to *, all ports)
NETRA_INBOUND_PROBABILITY inbound probability to route TCP sessions (defaults to 1)
NETRA_OUTBOUND_PROBABILITY outbound probability to route TCP sessions (defaults to 1)

Netra sidecar

Switches

Switch name Description
--service-name service name for jaeger distributed trace spans
Env name Description
NETRA_LOGGER_LEVEL logger level (defaults to info), supported values: debug, info, warning, error, fatal
NETRA_PORT netra sidecar listen port (defaults to 14956)
NETRA_PPROF_PORT netra sidecar pprof port (defaults to 14957)
NETRA_PROMETHEUS_PORT netra prometheus port (defaults to 14958)
NETRA_TRACING_CONTEXT_EXPIRATION_MILLISECONDS tracing context mapping cache expiration in milliseconds (defaults to 5000)
NETRA_TRACING_CONTEXT_CLEANUP_INTERVAL tracing context cleanup interval in milliseconds (defaults to 1000)
NETRA_STATSD_ENABLED enabling statsd. Set "true" to enable (defaults to false)
NETRA_STATSD_PREFIX Statsd prefix for all metrics (defaults to "")
NETRA_STATSD_ADDRESS Statsd gate (defaults to "")
NETRA_HTTP_PORTS comma separated ports to determine as HTTP1 protocol (no default)
NETRA_HTTP_REQUEST_ID_HEADER_NAME header name to match inbound and outbound requests. Applications should propagate it (defaults to X-Request-Id)
HTTP_HEADER_TAG_MAP comma separated HTTP header to jaeger span tag conversion (example: x-session:http.session,x-mobile-info:http.x-mobile-info)
HTTP_COOKIE_TAG_MAP comma separated HTTP cookie value to span tag conversion (example: sess:http.cookies.sess)
NETRA_HTTP_X_SOURCE_HEADER_NAME source HTTP header name. Automatically added to each outbound request in case this header absent in request (defaults to X-Source)
NETRA_HTTP_X_SOURCE_VALUE source HTTP header value (defaults to netra)
NETRA_HTTP_ROUTING_ENABLED set this to value "true" to enable HTTP header routing feature (disabled by default)
NETRA_HTTP_ROUTING_HEADER_NAME header name for HTTP header routing (defaults to X-Route). Value of header should be in the following format: host1=host2,host3=host4 to route host1 to host2 and host3 to host4.
NETRA_ROUTING_CONTEXT_EXPIRATION_MILLISECONDS routing context mapping cache expiration in milliseconds (defaults to 5000)
NETRA_ROUTING_CONTEXT_CLEANUP_INTERVAL routing context cleanup interval in milliseconds (defaults to 1000)
NETRA_HTTP_ROUTING_COOKIE_ENABLED set this to value "true" to enable routing logic from HTTP Cookie (should be enabled with NETRA_HTTP_ROUTING_ENABLED). Cookie has priority to routing HTTP header (disabled by default)
NETRA_HTTP_ROUTING_COOKIE_NAME cookie name for routing (defaults to X-Route)

Also it supports all env variables jaeger go library provides.

Comparison with Istio and linkerd2

Why do we need one more service mesh solution? Istio and linkerd2 are perfect service mesh solutions with very powerful set of features. But unfortunately they add significant resource and performance overhead. Netramesh main goal is providing observability to your distributed system with small overhead (approximately 10-50Mb on each netra sidecar) and 1ms of latency overhead. If you don't need entire set of features Istio and linkerd2 provide, but you need to collect distributed traces and obtain important information about your microservice interaction then netra is a great fit.

More Repositories

1

playbook

AvitoTech team playbook
1,443
star
2

Paparazzo

Custom iOS camera and photo picker with editing capabilities
Swift
769
star
3

avito-android

Infrastructure of Avito android
Kotlin
356
star
4

Emcee

Emcee is a tool that runs Android and iOS tests in parallel using multiple simulators and emulators across many servers
Swift
331
star
5

bioyino

High performance and high-precision multithreaded StatsD server
Rust
229
star
6

go-transaction-manager

Transaction manager for GoLang
Go
227
star
7

Marshroute

Marshroute is an iOS Library for making your Routers simple but extremely powerful
Swift
224
star
8

deepsecrets

Secrets scanner that understands code
Python
180
star
9

aqueduct

Framework for create performance-efficient prediction
Python
171
star
10

Mixbox

iOS UI testing framework https://t.me/mixbox_english https://t.me/mixbox_russian
Swift
152
star
11

go-mutesting

Mutation testing for Go source code. Fork from https://github.com/zimmski/go-mutesting
Go
145
star
12

krop

Small widget for image cropping in Instagram-like style
Kotlin
126
star
13

avitotech-presentations

Go
112
star
14

autumn-2021-intern-assignment

98
star
15

internship_backend_2022

Тестовое задание на позицию стажера-бэкендера
Go
84
star
16

Calcifer

Calcifer
Swift
72
star
17

nginx-log-collector

nginx-log-collector
Go
55
star
18

sx-frontend-trainee-assignment

Тестовое задание для стажёра Frontend в команду Seller Experience
53
star
19

Konveyor

Kotlin
48
star
20

auto-backend-trainee-assignment

Тестовое задание на позицию бекенд разработчика в юнит Авто
42
star
21

navigator

Multicluster service mesh solution based on envoy
Go
39
star
22

pulemet

Controlled RPS for interservice communication
Python
39
star
23

android-ui-testing

Kotlin
39
star
24

python-trainee-assignment

Тестовое задание по python
37
star
25

normalize

Go
35
star
26

adv-backend-trainee-assignment

Тестовое задание для стажёра Backend в команду Advertising
29
star
27

frontend-trainee-assignment-2023

27
star
28

internship_frontend_2022

Тестовое задание на позицию стажера-фронтендера
TypeScript
26
star
29

job-backend-trainee-assignment

Тестовое задание на позицию стажера-бекендера в юнит "Работа"
26
star
30

safedeal-frontend-trainee

22
star
31

pg_reindex

Console utility for rebuilding indexes and primary keys for PostgreSQL in automatic mode with analysis of index bloating and without table locking
Python
21
star
32

msg-backend-trainee-assignment

В ДАННЫЙ МОМЕНТ НЕ АКТУАЛЬНО! Тестовое задание на позицию стажера-бекендера
21
star
33

internship

Тестовое задание для iOS-стажировки
20
star
34

geo-backend-trainee-assignment

20
star
35

android-trainee-task-2021

20
star
36

blur-layout

Support for blurred semitransparent backgrounds in Android.
Assembly
19
star
37

verticals

Публичный репозиторий кластера Verticals
19
star
38

pro-fe-trainee-task

Тестовое задание для FE стажера в Авито Pro (Команда ARPU)
19
star
39

ios-trainee-problem-2021

Тестовое задание для стажера по направлению iOS
19
star
40

smart-redis-replication

Go
18
star
41

mi-backend-trainee-assignment

Тестовое задание для стажёра Backend в команду MI
17
star
42

dba-utils

Shell
17
star
43

clickhouse-vertica-udx

UDF to seamlessly connect ClickHouse to Vertica using external tables
C++
15
star
44

abito

Python package for hypothesis testing. Suitable for using in A/B-testing software
Python
15
star
45

prop-types-definition

Patch for prop-types to get property type definition in runtime
JavaScript
15
star
46

tm-backend-trainee

Тестовое задание для стажёра Backend в команду Trade Marketing
13
star
47

CommandLineToolkit

Small swift package to create command line tools faster
Swift
13
star
48

antibot-developer-trainee

Тестовая задача для разработчика-стажёра в команду Информационной безопасности Авито для защиты сайта от ботов
13
star
49

bx-backend-trainee-assignment

Тестовое задание на позицию стажера-бекендера в юнит Buyer Experience
12
star
50

mx-backend-trainee-assignment

Тестовое задание для стажёра Backend в команду MX
11
star
51

internship_ios_2022

Тестовое задание на позицию стажёра в iOS
Swift
10
star
52

patterns-and-practices-abstracts

9
star
53

dba-docs

PLpgSQL
9
star
54

qa-trainee-task

Тестовое задание для стажёра-автоматизатора
8
star
55

gravure

Image processing microservice
Rust
8
star
56

ImageSource

Image abstraction toolkit
Swift
8
star
57

pgmock

PostgreSQL 9.4+ extension for unit tests
PLpgSQL
8
star
58

mi-trainee-task-2021

7
star
59

puppet-controlrepo-template

Шаблон control repo для Puppet к статье «Инфраструктура как код в Авито: уроки которые мы извлекли»
Ruby
7
star
60

ap-frontend-trainee-assignment

7
star
61

pro-backend-trainee-assignment

6
star
62

mi-trainee-task

Тестовое задание для стажера в Market Intelligence.
6
star
63

android-trainee-task

6
star
64

ShopX-QA-trainee

задания к собеседованию
6
star
65

ios-trainee-problem

Задача для стажера на платформу iOS
6
star
66

iOS-trainee-assignment-2023

5
star
67

protocol-writer

Simplest of apps to write timed protocols from interviews
JavaScript
5
star
68

bx-android-trainee-assigment

5
star
69

safedeal-backend-trainee

5
star
70

puppet-module-template

Шаблон Puppet модуля к статье «Инфраструктура как код в Авито: уроки которые мы извлекли»
Ruby
5
star
71

android-peerlab-moscow

5
star
72

GraphiteClient

Lightweight Swift framework for feeding data into Graphite and statsD.
Swift
4
star
73

video-course-patterns-and-practices

PHP
4
star
74

xrpcd

PostgreSQL RPC built on top of pgq.
Python
4
star
75

doner

Centralized file downloading service
Rust
4
star
76

trainspotting

Python Dependency Injector based on interface binding
Python
4
star
77

moira

Go
3
star
78

qa-trainee-general

Тестовое задание для QA-cтажёра
3
star
79

aaa-ml-sys-design

ML System Design lectures materials
Python
3
star
80

aaa-ml-datasets-course

Репозиторий курса по созданию датасетов Академии Аналитиков Авито
Jupyter Notebook
3
star
81

vas-frontend-trainee-assignment

Задание для стажёра в команду VAS
2
star
82

Emcee.cloud.action

GItHub action for emcee.cloud
Shell
2
star
83

moira-client

Python
2
star
84

alert-autoconf

Python
2
star
85

homebrew-tap

Homebrew Tap of Avito products and tools
Ruby
2
star
86

avito-pixel

HTML
2
star
87

qa-into-CoE-trainee-task

Тестовое задание для стажёра QA в Центр экспертизы по Обеспечению качества
2
star
88

moira-web

JavaScript
1
star
89

test-asap

Package for easy to start browser testing
JavaScript
1
star
90

EmceePluginSupport

Swift package that allows to extend Emcee with plugins
Swift
1
star
91

avito-vault

Puppet модуль, автоматизирующий выкладку секретов из vault.
Ruby
1
star
92

brave-new-billing

Тестовое задание для backend-стажёра в юнит Billing, Avito
1
star
93

Emcee.cloud-CLI

Shell
1
star