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
ruaok
remind me to never fly AF again.
oh wait, I already don't. :)
stanislas
LordSputnik: Should I make get requests like this : get('/creator/{bbid}?user_id=3') ?
LordSputnik
stanislas: yup
Freso: reosarevok: mind if I put myself as mentor on the CB reviews tasks to help clear the backlog?
reosarevok
Feel free if you want
LordSputnik
reosarevok: I've got some time, my desktop is doing a chkdsk on a 1TB drive :P
JESUS2099
ruaok: grrr ;)
ruaok
sorry. had to. :)
JESUS2099
it’s not AF the problem, the problem is that someone was convinced to buy something called Zscaler, which is an awful POS :/
stanislas
LordSputnik: Should I make my own tests (i have done some already) or there is a way to test it some other way ?
LordSputnik
stanislas: no need to make tests, but I'd be very happy if you did :)
Leo_Verto
\o LordSputnik
LordSputnik
If I were writing it, I'd try to test it if I could easily
Leo_Verto: hey :)
stanislas
LordSputnik: Have you noticed that tests are becoming a serious part of bookbrainz-ws :) ?
LordSputnik: I will add tests about display_alias to my actual tests after commiting this - this way it would make more sense.
LordSputnik
stanislas: I thought to myself the other day - there's probably more lines of tests than there are of code :P
but who's testing the tests? :D haha
ruaok
search is dead. on it.
stanislas
LordSputnik: Yeah, I also thought of this. But then I've asked myself - what is wrong with me ? :)
(about testing the tests)
opatel99
JESUS2099: What do I do about Facebook's react class naming since it is very dynamic?
bitmap
zas: which machine were you thinking of using for website requests?
ruaok
search fixed.
bitmap: pingu now has and extra 8GB ram. total 24GB.
its total number of clients it can handle should be increased accordingly.
bitmap
hm, I thought zas had already put it in rotation. it's commented on ernie
ruaok
that was from post RAID fix.
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
LordSputnik
stanislas: hmm, why did you use -1 as a default value?
stanislas
because I didn't know if I can use 0
And ... why not ?
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
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
zas
bitmap: yes
LordSputnik
And then directly check if the user_id is None, and avoid making the query if it is :)
zas
it is in the same class of astro/asterix now
i put it in rotation to ensure it is working as it should, and it looks it is
stanislas
LordSputnik: ok, I will change it to None, and there is bug in get_entity_language_ids
zas
i think we could slow machines for websites, either lolo or dagon
bitmap
agreed
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
zas
insert "use" ^ ..
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
stanislas
LordSputnik: But 'If there are no aliases, use "(untitled)" or "(unnamed)" ' :)
LordSputnik
Hmm, you can still do that without constructing an Alias ;)
Just deal with it in the JSON function rather than the get_display_alias function
stanislas
LordSputnik: Ok, so I will return None
zas
how do we proceed ? i propose to change ernie/bert nginx config to route requests; matching ^/ws/[12]/ and using two upstream sets
so we keep exact same setup on all machines, but just exclude/include requests from one set or the other
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)"
bitmap
zas: I was thinking the same thing
if you can do that, I can remove the musicbrainz-ws services
stanislas
LordSputnik: So I should just make {'display_alias':None} in return JSON ?
* returned JSON
ruaok
whatever happened to the split where some instances do ws traffic and some do web page traffic? do we still do that?
opatel99
Freso: JESUS2099 ping regarding reactjs being ehhh
bitmap
I'm not sure we ever did that, at least while I was here
what we have now is separate unix sockets on each instance, one for ws traffic and another for website traffic
LordSputnik
stanislas: yeah I think that would be better actually
ruaok
yes, that.
remind me what the goal for that split was. I thought it was to ensure that web traffic always got better loading speed.
stanislas
LordSputnik: How do you imagine doing it outside python ? What do you mean by that ?
LordSputnik: I am not doing any SQL queries here.
(on aliases
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
LordSputnik
stanislas: entity_data.aliases is technically doing a query
Ignore what I said though, it'd be adding a load of complexity for not much benerfit - premature optimisation ;)
ruaok
DB sockets or overall sockets?
zas
bitmap: was it ? i thought it was to use a server with less load to serve website only requests
we currently have no exhaustion of sockets
bitmap
ruaok: whatever the connection limit for for unix sockets is
ruaok
odd. something there doesn't make sense to me.
but we are not favoring web traffic, so we should start doing that.