<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic RESTCONF vs REST API huge difference between response times in NSO Developer Hub Discussions</title>
    <link>https://community.cisco.com/t5/nso-developer-hub-discussions/restconf-vs-rest-api-huge-difference-between-response-times/m-p/4016980#M4690</link>
    <description>&lt;P&gt;Hi guys, I'm migrating REST API calls to RESTCONF calls, but RESTCONF is underperforming at any request.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;A href="http://127.0.0.1:8080/restconf/data/devices/device=OriHuaDemo" target="_blank" rel="noopener"&gt;http://127.0.0.1:8080/restconf/data/devices/device=OriHuaDemo&lt;/A&gt;&lt;/P&gt;&lt;P&gt;response time is 22 seconds&lt;/P&gt;&lt;P&gt;But the same query with REST API:&lt;/P&gt;&lt;P&gt;&lt;A href="http://127.0.0.1:8080/api/operational/devices/device/OriHuaDemo" target="_blank" rel="noopener"&gt;http://127.0.0.1:8080/api/operational/devices/device/OriHuaDemo&lt;/A&gt;&lt;/P&gt;&lt;P&gt;response time is 6 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have any clue why this is happening? it's a normal behavior?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried also CLI and JSONRPC, both faster, this performance issue seems to be RESTCONF specific.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Jan 2020 11:59:27 GMT</pubDate>
    <dc:creator>DanielSan6998</dc:creator>
    <dc:date>2020-01-23T11:59:27Z</dc:date>
    <item>
      <title>RESTCONF vs REST API huge difference between response times</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/restconf-vs-rest-api-huge-difference-between-response-times/m-p/4016980#M4690</link>
      <description>&lt;P&gt;Hi guys, I'm migrating REST API calls to RESTCONF calls, but RESTCONF is underperforming at any request.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;A href="http://127.0.0.1:8080/restconf/data/devices/device=OriHuaDemo" target="_blank" rel="noopener"&gt;http://127.0.0.1:8080/restconf/data/devices/device=OriHuaDemo&lt;/A&gt;&lt;/P&gt;&lt;P&gt;response time is 22 seconds&lt;/P&gt;&lt;P&gt;But the same query with REST API:&lt;/P&gt;&lt;P&gt;&lt;A href="http://127.0.0.1:8080/api/operational/devices/device/OriHuaDemo" target="_blank" rel="noopener"&gt;http://127.0.0.1:8080/api/operational/devices/device/OriHuaDemo&lt;/A&gt;&lt;/P&gt;&lt;P&gt;response time is 6 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have any clue why this is happening? it's a normal behavior?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried also CLI and JSONRPC, both faster, this performance issue seems to be RESTCONF specific.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2020 11:59:27 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/restconf-vs-rest-api-huge-difference-between-response-times/m-p/4016980#M4690</guid>
      <dc:creator>DanielSan6998</dc:creator>
      <dc:date>2020-01-23T11:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: RESTCONF vs REST API huge difference between response times</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/restconf-vs-rest-api-huge-difference-between-response-times/m-p/4017142#M4692</link>
      <description>&lt;P&gt;I also see a difference REST vs RESTCONF for the get of the same operational item ncs-state, but not as marked as you test case.&lt;/P&gt;
&lt;P&gt;I'm seeing RESTCONF 168 msec vs REST 55 msec (NSO version 5.2.0.1, request from the same server, port 8080)&lt;/P&gt;
&lt;P&gt;The path in your url for your RESTCONF call /restconf/data/ncs-data actually fails when I attempt the GET:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="http://127.0.0.1:8080/restconf/data/ncs-state" target="_blank" rel="noopener"&gt;http://127.0.0.1:8080/restconf/data/ncs-state&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Status: 400 Bad Request&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;errors&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;xmlns&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"urn:ietf:params:xml:ns:yang:ietf-restconf"&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;error&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;error-message&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;missing&amp;nbsp;module&amp;nbsp;name&amp;nbsp;for&amp;nbsp;'nc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t;errors&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;However, when I add the module for ncs-state:&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&lt;A href="http://127.0.0.1:8080/restconf/data/tailf-ncs-monitoring:ncs-state" target="_blank" rel="noopener"&gt;http://127.0.0.1:8080/restconf/data/tailf-ncs-monitoring:ncs-state&lt;/A&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;I successfully get a response.&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I'm not sure how/why you are seeing success when providing a path with no module name.&lt;/DIV&gt;
&lt;DIV&gt;I wonder if you provide the module name in your path if your RESTCONF performance will get better.&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NSO Version you are using?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2020 15:28:42 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/restconf-vs-rest-api-huge-difference-between-response-times/m-p/4017142#M4692</guid>
      <dc:creator>lmanor</dc:creator>
      <dc:date>2020-01-23T15:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: RESTCONF vs REST API huge difference between response times</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/restconf-vs-rest-api-huge-difference-between-response-times/m-p/4017767#M4694</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/925847"&gt;@DanielSan6998&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi guys, I'm migrating REST API calls to RESTCONF calls, but RESTCONF is underperforming at any request.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;First of all, happy to see that you are migrating from REST API to RESTCONF!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://127.0.0.1:8080/restconf/data/devices/device=OriHuaDemo" target="_blank" rel="noopener"&gt;http://127.0.0.1:8080/restconf/data/devices/device=OriHuaDemo&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;response time is 22 seconds&lt;/P&gt;
&lt;P&gt;But the same query with REST API:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://127.0.0.1:8080/api/operational/devices/device/OriHuaDemo" target="_blank" rel="noopener"&gt;http://127.0.0.1:8080/api/operational/devices/device/OriHuaDemo&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;response time is 6 seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you have any clue why this is happening? it's a normal behavior?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried also CLI and JSONRPC, both faster, this performance issue seems to be RESTCONF specific.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;TL;DR It is probably not the same thing that is compared. RESTCONF is somewhat&lt;BR /&gt;faster for comparable payloads in benchmarks.&lt;BR /&gt;&lt;BR /&gt;A normal GET request to RESTCONF is similar to using query parameters "verbose"&lt;BR /&gt;and "deep" for REST API. Otherwise the result payload will be very different, similar&lt;BR /&gt;in size order as the time difference presented.&lt;BR /&gt;&lt;BR /&gt;On a new installation of NSO I performed these queries&lt;BR /&gt;&lt;BR /&gt;REST API&lt;/P&gt;
&lt;PRE&gt;$ time curl -isu admin:admin localhost:8080/api/operational?verbose\&amp;amp;deep | wc -l
3547

real 0m0.235s
user 0m0.015s
sys 0m0.034
&lt;/PRE&gt;
&lt;P&gt;Not using the "verbose" and "deep" query parameters will yield about half the&lt;BR /&gt;lines of payload, and hence be faster.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Analog for RESTCONF&lt;/P&gt;
&lt;PRE&gt;$ time curl -isu admin:admin localhost:8080/restconf/data | wc -l
3515

real 0m0.189s
user 0m0.014s
sys 0m0.004s
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The tests have been run a number of times and consistently shows similar&lt;BR /&gt;results on my machine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example towards ncs-state where similar differences shows&lt;/P&gt;
&lt;PRE&gt;$ time curl -isu admin:admin localhost:8080/api/operational/ncs-state | wc -l&lt;BR /&gt;379&lt;BR /&gt;&lt;BR /&gt;real 0m0.024s&lt;BR /&gt;user 0m0.007s&lt;BR /&gt;sys 0m0.010s&lt;BR /&gt;&lt;BR /&gt;$ time curl -isu admin:admin localhost:8080/api/operational/ncs-state?verbose\&amp;amp;deep | wc -l&lt;BR /&gt;956&lt;BR /&gt;&lt;BR /&gt;real 0m0.065s&lt;BR /&gt;user 0m0.022s&lt;BR /&gt;sys 0m0.000s&lt;BR /&gt;&lt;BR /&gt;$ time curl -isu admin:admin localhost:8080/restconf/data/tailf-ncs-monitoring:ncs-state | wc -l&lt;BR /&gt;955&lt;BR /&gt;&lt;BR /&gt;real 0m0.058s&lt;BR /&gt;user 0m0.000s&lt;BR /&gt;sys 0m0.016s&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The results show that RESTCONF is somewhat faster on comparable payloads.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are still some things that can be done to tweak RESTCONF performance&lt;BR /&gt;of course, which we are discussing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would be interesting to see benchmarks comparing REST API, RESTCONF,&lt;BR /&gt;CLI, and JSON-RPC, please send us your findings!&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2020 12:25:34 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/restconf-vs-rest-api-huge-difference-between-response-times/m-p/4017767#M4694</guid>
      <dc:creator>perander</dc:creator>
      <dc:date>2020-01-24T12:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: RESTCONF vs REST API huge difference between response times</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/restconf-vs-rest-api-huge-difference-between-response-times/m-p/4030825#M4819</link>
      <description>Hey! Did the answer I gave clarify anything?</description>
      <pubDate>Mon, 17 Feb 2020 11:02:20 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/restconf-vs-rest-api-huge-difference-between-response-times/m-p/4030825#M4819</guid>
      <dc:creator>perander</dc:creator>
      <dc:date>2020-02-17T11:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: RESTCONF vs REST API huge difference between response times</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/restconf-vs-rest-api-huge-difference-between-response-times/m-p/4085410#M5236</link>
      <description>&lt;P&gt;I see --&amp;nbsp;&lt;SPAN&gt;- rest-api: The REST API is deprecated and will be removed in NSO-5.3.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Users of the REST API should use the RESTCONF API instead,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;see NSO Northbound APIs: Migrating from REST to the&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;RESTCONF API.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(ENG-20521)&amp;nbsp; in the CHANGES text of 5.1.0.1 NSO&amp;nbsp; - wanted to see if anyone has experience with migration they can share&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2020 23:15:08 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/restconf-vs-rest-api-huge-difference-between-response-times/m-p/4085410#M5236</guid>
      <dc:creator>srisikha@cisco.com</dc:creator>
      <dc:date>2020-05-13T23:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: RESTCONF vs REST API huge difference between response times</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/restconf-vs-rest-api-huge-difference-between-response-times/m-p/4085638#M5238</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/638344"&gt;srisikha@cisco.com&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;(ENG-20521)&amp;nbsp; in the CHANGES text of 5.1.0.1 NSO&amp;nbsp; - wanted to see if anyone has experience with migration they can share&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;There are some related questions asked previously.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.cisco.com/t5/nso-developer-hub-discussions/restconf-missing-module-name-for-devices/m-p/3878649" target="_blank"&gt;https://community.cisco.com/t5/nso-developer-hub-discussions/restconf-missing-module-name-for-devices/m-p/3878649&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.cisco.com/t5/nso-developer-hub-discussions/nso-show-devices-brief-via-restconf/td-p/4053450" target="_blank"&gt;https://community.cisco.com/t5/nso-developer-hub-discussions/nso-show-devices-brief-via-restconf/td-p/4053450&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.cisco.com/t5/nso-developer-hub-discussions/nso-query-via-get-curl/td-p/4044836" target="_blank"&gt;https://community.cisco.com/t5/nso-developer-hub-discussions/nso-query-via-get-curl/td-p/4044836&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 May 2020 09:17:25 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/restconf-vs-rest-api-huge-difference-between-response-times/m-p/4085638#M5238</guid>
      <dc:creator>perander</dc:creator>
      <dc:date>2020-05-14T09:17:25Z</dc:date>
    </item>
  </channel>
</rss>

