Freso chirlu` at my company, websites in HTTPS are sluggish like hell… the proxy acts like a man in the middle and redirects 2 or 3 times and invalidates all cache… then a page in HTTPS is likely to completely fail because of the borked certificate also
2016-01-13 01314, 2016
ruaok
remind me to never fly AF again.
2016-01-13 01322, 2016
ruaok
oh wait, I already don't. :)
2016-01-13 01339, 2016
stanislas
LordSputnik: Should I make get requests like this : get('/creator/{bbid}?user_id=3') ?
2016-01-13 01341, 2016
LordSputnik
stanislas: yup
2016-01-13 01333, 2016
LordSputnik
Freso: reosarevok: mind if I put myself as mentor on the CB reviews tasks to help clear the backlog?
2016-01-13 01343, 2016
reosarevok
Feel free if you want
2016-01-13 01357, 2016
LordSputnik
reosarevok: I've got some time, my desktop is doing a chkdsk on a 1TB drive :P
2016-01-13 01305, 2016
JESUS2099
ruaok: grrr ;)
2016-01-13 01316, 2016
ruaok
sorry. had to. :)
2016-01-13 01323, 2016
JESUS2099
it’s not AF the problem, the problem is that someone was convinced to buy something called Zscaler, which is an awful POS :/
2016-01-13 01340, 2016
stanislas
LordSputnik: Should I make my own tests (i have done some already) or there is a way to test it some other way ?
2016-01-13 01354, 2016
LordSputnik
stanislas: no need to make tests, but I'd be very happy if you did :)
2016-01-13 01355, 2016
Leo_Verto
\o LordSputnik
2016-01-13 01313, 2016
LordSputnik
If I were writing it, I'd try to test it if I could easily
2016-01-13 01318, 2016
LordSputnik
Leo_Verto: hey :)
2016-01-13 01339, 2016
stanislas
LordSputnik: Have you noticed that tests are becoming a serious part of bookbrainz-ws :) ?
2016-01-13 01328, 2016
stanislas
LordSputnik: I will add tests about display_alias to my actual tests after commiting this - this way it would make more sense.
2016-01-13 01301, 2016
LordSputnik
stanislas: I thought to myself the other day - there's probably more lines of tests than there are of code :P
2016-01-13 01334, 2016
LordSputnik
but who's testing the tests? :D haha
2016-01-13 01329, 2016
ruaok
search is dead. on it.
2016-01-13 01326, 2016
stanislas
LordSputnik: Yeah, I also thought of this. But then I've asked myself - what is wrong with me ? :)
2016-01-13 01341, 2016
stanislas
(about testing the tests)
2016-01-13 01329, 2016
opatel99
JESUS2099: What do I do about Facebook's react class naming since it is very dynamic?
2016-01-13 01345, 2016
bitmap
zas: which machine were you thinking of using for website requests?
2016-01-13 01311, 2016
ruaok
search fixed.
2016-01-13 01335, 2016
ruaok
bitmap: pingu now has and extra 8GB ram. total 24GB.
2016-01-13 01351, 2016
ruaok
its total number of clients it can handle should be increased accordingly.
2016-01-13 01317, 2016
bitmap
hm, I thought zas had already put it in rotation. it's commented on ernie
2016-01-13 01359, 2016
ruaok
that was from post RAID fix.
2016-01-13 01319, 2016
ruaok
I believe earlier he did some updates, but was waiting for you to put it into rotation
nm, it's uncommented on bert and appears to be handling requests
2016-01-13 01334, 2016
LordSputnik
stanislas: hmm, why did you use -1 as a default value?
2016-01-13 01356, 2016
stanislas
because I didn't know if I can use 0
2016-01-13 01303, 2016
stanislas
And ... why not ?
2016-01-13 01324, 2016
bitmap
so it's currently at weight=20 on bert, same as asterix and astro, and has been handling requests for about 1.5 hours
2016-01-13 01341, 2016
LordSputnik
stanislas: Well, generally it's best to avoid "magic numbers" if the language has something to represent "nothing" - in this case, Python has None, so I'd prefer that
2016-01-13 01304, 2016
zas
bitmap: yes
2016-01-13 01306, 2016
LordSputnik
And then directly check if the user_id is None, and avoid making the query if it is :)
2016-01-13 01323, 2016
zas
it is in the same class of astro/asterix now
2016-01-13 01340, 2016
zas
i put it in rotation to ensure it is working as it should, and it looks it is
2016-01-13 01349, 2016
stanislas
LordSputnik: ok, I will change it to None, and there is bug in get_entity_language_ids
2016-01-13 01304, 2016
zas
i think we could slow machines for websites, either lolo or dagon
2016-01-13 01322, 2016
bitmap
agreed
2016-01-13 01351, 2016
LordSputnik
stanislas: another thing is I think get_display_alias should return None if it can't find one, then the rest of the code should deal with that specially, rather than constructing a placeholder untitled alias
2016-01-13 01310, 2016
zas
insert "use" ^ ..
2016-01-13 01344, 2016
LordSputnik
stanislas: another way you could optimise it is by changing your find_alias_if function to run the function in the query rather than in Python, after the results have been fetched
2016-01-13 01346, 2016
stanislas
LordSputnik: But 'If there are no aliases, use "(untitled)" or "(unnamed)" ' :)
2016-01-13 01341, 2016
LordSputnik
Hmm, you can still do that without constructing an Alias ;)
2016-01-13 01304, 2016
LordSputnik
Just deal with it in the JSON function rather than the get_display_alias function
2016-01-13 01305, 2016
stanislas
LordSputnik: Ok, so I will return None
2016-01-13 01308, 2016
zas
how do we proceed ? i propose to change ernie/bert nginx config to route requests; matching ^/ws/[12]/ and using two upstream sets
2016-01-13 01338, 2016
zas
so we keep exact same setup on all machines, but just exclude/include requests from one set or the other
2016-01-13 01357, 2016
LordSputnik
stanislas: That way, if someone wants to use get_display_alias somewhere else, they can tell if they have a valid Alias or nothing - at the moment, there's no way to tell if the stored alias is actually "(untitled)"
2016-01-13 01303, 2016
bitmap
zas: I was thinking the same thing
2016-01-13 01343, 2016
bitmap
if you can do that, I can remove the musicbrainz-ws services
2016-01-13 01347, 2016
stanislas
LordSputnik: So I should just make {'display_alias':None} in return JSON ?
2016-01-13 01356, 2016
stanislas
* returned JSON
2016-01-13 01312, 2016
ruaok
whatever happened to the split where some instances do ws traffic and some do web page traffic? do we still do that?
2016-01-13 01358, 2016
opatel99
Freso: JESUS2099 ping regarding reactjs being ehhh
2016-01-13 01301, 2016
bitmap
I'm not sure we ever did that, at least while I was here
2016-01-13 01345, 2016
bitmap
what we have now is separate unix sockets on each instance, one for ws traffic and another for website traffic
2016-01-13 01344, 2016
LordSputnik
stanislas: yeah I think that would be better actually
2016-01-13 01356, 2016
ruaok
yes, that.
2016-01-13 01327, 2016
ruaok
remind me what the goal for that split was. I thought it was to ensure that web traffic always got better loading speed.
2016-01-13 01333, 2016
stanislas
LordSputnik: How do you imagine doing it outside python ? What do you mean by that ?
2016-01-13 01354, 2016
stanislas
LordSputnik: I am not doing any SQL queries here.
2016-01-13 01304, 2016
stanislas
(on aliases
2016-01-13 01329, 2016
bitmap
ruaok: the goal there was to make sure the ws traffic couldn't use up all available socket connections, and leave none for the website
2016-01-13 01332, 2016
LordSputnik
stanislas: entity_data.aliases is technically doing a query
2016-01-13 01359, 2016
LordSputnik
Ignore what I said though, it'd be adding a load of complexity for not much benerfit - premature optimisation ;)
2016-01-13 01321, 2016
ruaok
DB sockets or overall sockets?
2016-01-13 01333, 2016
zas
bitmap: was it ? i thought it was to use a server with less load to serve website only requests
2016-01-13 01355, 2016
zas
we currently have no exhaustion of sockets
2016-01-13 01333, 2016
bitmap
ruaok: whatever the connection limit for for unix sockets is
2016-01-13 01304, 2016
ruaok
odd. something there doesn't make sense to me.
2016-01-13 01320, 2016
ruaok
but we are not favoring web traffic, so we should start doing that.