Jump to content

Question regarding third-party services used by server and apps.


Go to solution Solved by softworkz,

Recommended Posts

Posted

I am beginning to monitor the uptime/status of third-party web services used by my various services. I am now working on Emby, and I have some questions to ask:

Besides mb3admin.com and connect.emby.media, are there any third-party web services (besides metadata fetchers) used by Emby?

The two Emby web services I listed above, are there any dedicated ping/healthcheck endpoints I can reach out to? If not, what endpoint would you guys recommend to get the status of those services?

Posted

Hi, we'd probably have to add something. The only other one I can think of is the github api.

Posted (edited)
1 hour ago, Luke said:

Hi, we'd probably have to add something. The only other one I can think of is the github api.

Yeah I make a lot of requests to github from various applications now that you mention it,,, good catch.

 

Would you guys be able to add some sort of /ping, /status, or /health endpoint to them and return something simple like a plain old "OK", {"Status": "OK"}? In the meantime I will just use a random endpoint and make sure I get some sort of response, so long as it's not a 500 status code.

Edited by rechigo
Posted

It makes sense yes. Thanks.

Posted

Hi.  Both of our end points will respond quickly to an OPTIONS request.  Please use sparingly as we don't need extra traffic.

Thanks.

Posted
32 minutes ago, ebr said:

Both of our end points will respond quickly to an OPTIONS request.

(he means 'hosts')

So, practically speaking:

  • Choose ONE endpoint on connect.emby.media (e.g /service/register) and one for mb3admin
    => If an endpoint returns 200, then all endpoints on the same host are working (it's a single service in both cases)
  • Instead of GET, make an OPTIONS request
  • Please make the interval >= 5 minutes, otherwise your IP address might get blocked at some point
Posted (edited)
8 hours ago, softworkz said:

Choose ONE endpoint on connect.emby.media (e.g /service/register) and one for mb3admin
=> If an endpoint returns 200, then all endpoints on the same host are working (it's a single service in both cases)

So just to be clear, connect.emby.media and mb3admin both point to one service? Or does each host have its own dedicated service? 

 

I'm thinking I can knock two birds with one stone by making a POST to https://mb3admin.com/admin/service/registration/getStatus, which will allow me to not only check the API is able to give a response to a request that makes a database query, but also that my server is within the device limit as indicated by "deviceStatus" field. I will use this sparingly and only check every 5-10 minutes. Is this okay to do, or do you want me to stick to OPTIONS?

Edited by rechigo
  • Solution
Posted
2 hours ago, rechigo said:

So just to be clear, connect.emby.media and mb3admin both point to one service? Or does each host have its own dedicated service? 

No.

> Choose ONE endpoint on the connect.emby.media host
> and one endpoint on the mb3admin host

> it's a single service in both cases

=> a single service here and a single service there

 

2 hours ago, rechigo said:

I'm thinking I can knock two birds with one stone by making a POST to https://mb3admin.com/admin/service/registration/getStatus, which will allow me to not only check the API is able to give a response to a request that makes a database query, but also that my server is within the device limit as indicated by "deviceStatus" field. I will use this sparingly and only check every 5-10 minutes. Is this okay to do, or do you want me to stick to OPTIONS?

Please use OPTIONS for the 5-10min checks. You can still do the POST but not that often. once or twice a day should suffice. The deviceStatus doesn't change that often anyway and the service being available but not the db is rather unlikely.

Of course it's not that your requests would cause a big problem. But at some later time, somebody may read this and think this is a good idea for developing something which does these thing - maybe some plugin for Emby, or some dashboard software. Then let this plugin get only 1k users and we do the math: 5 min interval means 12/h or 288/day - so that would already be additional 300k requests per day. or 3M if it would be 10k users. When we have to start blocking the source ips, nobody would be happy in the end..

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...