Commit Graph

26 Commits

Author SHA1 Message Date
Bryan Boreham
ad34c5fd26 refactor: camlistore lru package moved location 2019-09-23 10:43:17 +00:00
Bryan Boreham
15467d7310 Move host-related names out of probe code
Reduce the dependency on low-level libraries
2019-09-13 11:41:09 +00:00
Bryan Boreham
94dbee2124 Move "hideous hack" for Kubernetes service network from probe to app
This avoids side-effects from reporting Kubernetes from a
cluster-level probe, and removes a lie from the probe data.

Rather than do the work every time the probe sends a report, we do it
every time the app renders endpoints, which should be once per merged
report set.
2018-11-19 14:54:20 +00:00
Ilya Dmitrichenko
e024ab2d1f Add (cloud.)weave.works to the list of known services 2018-02-22 17:19:55 +00:00
Matthias Radestock
be8801ab92 optimisation: faster knownServiceCache
We use an LRU cache implementation that is keyed on strings, which
avoids conversion to/from interface and the memory allocation that
entails.
2017-11-25 19:33:49 +00:00
Matthias Radestock
7119fb9de8 refactor: rename report.NewNetworks to MakeNetworks
for consistency - all the other report set constructors are called
'Make...'
2017-07-03 01:26:22 +01:00
Matthias Radestock
a306867610 fast network membership check
The rendering code checks whether endpoint IPs are part of
cluster-local networks. Due to the prevalence of endpoints - medium
sized reports can contain many thousands of endpoints - this is
performance critical. Alas the existing code performs the check via a
linear scan of a list of networks. That is slow when there are more
than a few, which will be the case in the context of k8s, since there
the probes register service IPs as local /32 networks.

Here we change representation of the set of networks to a prefix
tree (aka trie), which is well-suited for IP network membership checks
since networks are in fact a bitstring prefixes.

The specific representation is a crit-bit tree, but that choice was
purely based on implementation convenience - the chosen library is the
only one I could find that directly supports IP networks.
2017-06-21 03:03:49 +01:00
Matthias Radestock
9e75331e9a Revert "fast network membership check"
This reverts commit 98f036359b.
2017-06-20 20:51:27 +01:00
Matthias Radestock
98f036359b fast network membership check
The rendering code checks whether endpoint IPs are part of
cluster-local networks. Due to the prevalence of endpoints - medium
sized reports can contain many thousands of endpoints - this is
performance critical. Alas the existing code performs the check via a
linear scan of a list of networks. That is slow when there are more
than a few. Unfortunately in some common k8s network setups, e.g. on
AWS, a cluster can contain hundreds of networks, due to /32 networks
derived from interfaces with multiple IPs.

Here we change representation of the set of networks to a prefix
tree (aka trie), which is well-suited for IP network membership checks
since networks are in fact a bitstring prefixes.

The specific representation is a crit-bit tree, but that choice was
purely based on implementation convenience - the chosen library is the
only one I could find that directly supports IP networks.
2017-06-20 19:31:11 +01:00
Matthias Radestock
873fac12ac memoize isKnownServices for improved performance 2017-06-19 13:29:43 +01:00
Matthias Radestock
0d0414d348 faster matching of known services
We hit this code *a lot* during rendering.
2017-06-18 16:02:34 +01:00
preston_doster_tc
ed9c369f50 Standardized formatting. 2017-05-15 15:27:48 -05:00
preston_doster_tc
0f1c2f1cb7 Corrected spacing. 2017-05-15 13:32:39 -05:00
preston_doster_tc
df58f55782 Added Azure endpoints so they show up as individual nodes instead of under 'The Internet'. 2017-05-15 13:27:06 -05:00
Alfonso Acosta
c5ac315b38 Review feedback 2016-09-20 16:50:29 +00:00
Alfonso Acosta
193bfec50b Exclude ec2 since it's too generic 2016-09-19 14:45:22 +00:00
Alfonso Acosta
028ed32b6f Simplify service node matching 2016-09-19 14:38:59 +00:00
Alfonso Acosta
5c080ec062 Add pseudo-nodes for known services
AWS S3 and Dynamo to start with
2016-09-19 14:38:58 +00:00
Paul Bellamy
7090855f9e Add local_networks to weave Overlay nodes, so we can track weave without an exposed weave ip (#1313) 2016-04-15 16:23:15 +01:00
Tom Wilkie
6b56475766 Use ps.Map for Counters and Sets, remove Metadata in favour of Latest.
Also
- Add more complicated report.json for benchmark
- Break up report/topology.go
- Implement our own DeepEqual for ps.Map
2016-01-22 15:10:32 -08:00
Tom Wilkie
ec4425fb80 Use Node.Sets for Host Local Networks. 2015-10-27 14:35:07 +00:00
Tom Wilkie
57f7b4f2e6 Rename NodeMetadata -> Node 2015-09-03 16:18:54 +00:00
Tom Wilkie
c2065836e2 Make NodeMetadata a struct, move existing map[string]string to NodeMetadata.Metadata 2015-07-15 10:06:36 +00:00
Tom Wilkie
626320d7f4 Move probe host topology code into its own module
- add tests
- use constants for NodeMetadata keys
- add host uptime and kernel version
2015-06-23 13:31:22 +00:00
Tom Wilkie
82a7f93e17 Treat addresses on the docker bridge as local. 2015-06-22 11:24:47 +00:00
Tom Wilkie
49dae07cca Make render module produce The Internet pseudo node. 2015-06-19 11:09:52 +00:00