GithubHelp home page GithubHelp logo

etcd-play's People

Contributors

ericchiang avatar furikuri avatar gyuho avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

etcd-play's Issues

deploy with kubernetes

Right now etcd agent is standalone which was part of the original design of the etcd functional tests. Now that we have kubernetes we should make a driver that talks to kubernetes instead.

tcp connection leaks

2016-03-03 00:27:36.519135 W | etcdserver: 80% of the file descriptor limit is used [used = 1009, limit = 1024]
2016-03-03 00:27:41.519137 W | etcdserver: 80% of the file descriptor limit is used [used = 1014, limit = 1024]
2016-03-03 00:27:46.519567 W | etcdserver: 80% of the file descriptor limit is used [used = 1019, limit = 1024]
2016-03-03 00:27:51.519277 W | etcdserver: 80% of the file descriptor limit is used [used = 1024, limit = 1024

better in-memory cache control

I still see some delay loading the initial node status when there
are multiple users online. It should be from global lock contentions.
Possibly use external cache libraries.

Or profile it and optimize Go code.

*: show request status, support watch

Let users try out watch feature. Then it needs to support long running
client requests without timeout. Needs some kind of progress bar or something.

Related to #33.

scalability: decrease global lock contention

Status of cluster is shared globally, which is protected by global lock.
This is not a good practice when there are many concurrent users.
When it had more than 20 users, I could see play.etcd.io run slower.

We need to make each client(website user) subscribe to status update channel.
And at the top level, copy the status value and send those copies to client channels,
so that we only need to lock when it updates the globally defined status.
Clients just receives the copied values from the channel.

grpc connection errors

The client needs to get status of the cluster periodically (every second). And it got this error:

2016/03/02 17:49:00 Failed to dial 10.240.0.9:1278: grpc: the client connection is closing; please retry.
2016/03/02 17:49:01 grpc: Conn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp 10.240.0.10:1278: connect: cannot assign requested address"; Reconnecting to "10.240.0.10:1278"
2016/03/02 17:49:01 grpc: Conn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp 10.240.0.9:1278: connect: cannot assign requested address"; Reconnecting to "10.240.0.9:1278"
2016/03/02 17:49:02 grpc: Conn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp 10.240.0.9:1278: connect: cannot assign requested address"; Reconnecting to "10.240.0.9:1278"
2016/03/02 17:49:02 grpc: Conn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp 10.240.0.10:1278: connect: cannot assign requested address"; Reconnecting to "10.240.0.10:1278"
2016/03/02 17:49:03 grpc: Conn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp 10.240.0.10:1278: connect: cannot assign requested address"; Reconnecting to "10.240.0.10:1278"
2016/03/02 17:49:04 grpc: Conn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp 10.240.0.9:1278: connect: cannot assign requested address"; Reconnecting to "10.240.0.9:1278"
2016/03/02 17:49:05 grpc: Conn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp 10.240.0.10:1278: connect: cannot assign requested address"; Reconnecting to "10.240.0.10:1278"
2016/03/02 17:49:05 Failed to dial 10.240.0.10:1278: grpc: timed out trying to connect; please retry.
2016/03/02 17:49:08 grpc: Conn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp 10.240.0.10:1278: connect: cannot assign requested address"; Reconnecting to "10.240.0.10:1278"
2016/03/02 17:49:08 grpc: Conn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp 10.240.0.9:1278: connect: cannot assign requested address"; Reconnecting to "10.240.0.9:1278"
2016/03/02 17:49:10 grpc: Conn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp 10.240.0.9:1278: connect: cannot assign requested address"; Reconnecting to "10.240.0.9:1278"
2016/03/02 17:49:10 grpc: Conn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp 10.240.0.10:1278: connect: cannot assign requested address"; Reconnecting to "10.240.0.10:1278"
2016/03/02 17:49:12 grpc: Conn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp 10.240.0.9:1278: connect: cannot assign requested address"; Reconnecting to "10.240.0.9:1278"
2016/03/02 17:49:12 grpc: Conn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp 10.240.0.10:1278: connect: cannot assign requested address"; Reconnecting to "10.240.0.10:1278"
2016/03/02 17:49:13 grpc: Conn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp 10.240.0.10:1278: connect: cannot assign requested address"; Reconnecting to "10.240.0.10:1278"

sanitize user input (prevent XSS)

Someone can try to inject Javascript snippet through 'user input' (like alert("1")).
We need a way to prevent this by sanitizing user inputs, or use text/template package
to escape data.

backend: better active user control

Currently it keeps track of active users by the size of user cache map.
But it's not clearly defined when a user is considered not-active.
It just manually cleans up such users in for-loop with 5 minute interval.

Make this happen atomically, so that we can reduce the contention
around global user cache.

HEAD request returns 404

When I attempt a HEAD request on the playground, I get a 404:

$ curl -v --head http://play.etcd.io/                                                                                ~/code/crawford/marker
*   Trying 104.199.121.254...
* TCP_NODELAY set
* Connected to play.etcd.io (104.199.121.254) port 80 (#0)
> HEAD / HTTP/1.1
> Host: play.etcd.io
> User-Agent: curl/7.53.1
> Accept: */*
>
< HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
< Server: nginx/1.10.1 (Ubuntu)
Server: nginx/1.10.1 (Ubuntu)
< Date: Tue, 15 Aug 2017 17:33:34 GMT
Date: Tue, 15 Aug 2017 17:33:34 GMT
< Content-Type: text/html; charset=utf-8
Content-Type: text/html; charset=utf-8
< Content-Length: 140
Content-Length: 140
< Connection: keep-alive
Connection: keep-alive
< X-Powered-By: Express
X-Powered-By: Express
< Access-Control-Allow-Origin: *
Access-Control-Allow-Origin: *
< Content-Security-Policy: default-src 'self'
Content-Security-Policy: default-src 'self'
< X-Content-Type-Options: nosniff
X-Content-Type-Options: nosniff
< Vary: Accept-Encoding
Vary: Accept-Encoding

<
* Connection #0 to host play.etcd.io left intact

When I do a GET, I get a 200. The HEAD request should also return a 200.

backend: cache etcd status

Currently every single ajax call hits etcd api endpoints, to get hashes and metrics. This is not efficient.
When there are multiple active users at the same time, this can overload etcd cluster with duplicate
requests for the same timestamp. There should be one status polling handler to keep the status data
up-to-data and serve it to all ajax calls on the fly.

broadcast logs to multiple browser

Currently user IP + user agent generate an unique identifier to receive status updates to the browser. So if one person has multiple tabs or windows of play.etcd.io with the same browser, only one browser gets the update.

Fix this by giving unique ID for each tab/windows.

etcd-local: ignore etcd logs

Currently etcd-play web launches etcd in localhost,
and shows all the etcd logs to browser. Make this configurable
so that people can discard logs if they want.

backend: multiplex client requests

Current one machine handles all client requests from the web interface.
There needs to some kind of rate limiting and scheduling if there are too
many concurrent ones. This needs better status reporting of client requests
(web UI).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.